ZAggr#

class scio.utils.ZAggr(value)[source]#

Bases: str, EnumWithExplicitSupport

Enum for supported \(z\)-aggregation schemes in Odds.

From [RKH19, section 3.3 and Appendix 7.1], it is clear that the \(z\)-normalized deviations for \(g_{yz}\) are thresholded using OoD calibration data. This is not allowed in our unsupervised setup. As such, we choose to measure nonconformity with regard to class \(c\) by aggregating these statistics against the candidate class. The idea is that if an example of true class \(c_1\) was manipulated to appear as \(c_2\), then \(g_{c_1c_2}\) would be very low and \(g_{c_2c_1}\) very high, while the other \(g_{yz}\) would be noisy statistics (?). From this, the following three simple aggregation schemes arise.

Member

Value

Description

DETECT

'detect'

By looking the for maximum \(g_{yz}\) across \(z\), try to identify suspicious class favorism.

RECTIFY

'rectify'

By looking for the minimum \(g_{yz}\) across \(z\), look for unjustly neglected class.

SUM

'sum'

By summing along \(z\), hope to not only detect OoD, but also identify the correct class. Sadly, the “noisy” statistics \(g_{yz}\) for \(z\) different from \(c_1\) and \(c_2\) do impact the final result. This is why it’s not an obvious better option.