T-norms¶
Triangular norms for soft and uncertain ground truth.
When the label matrix is soft — annotator proportions, crowd labels, or a probabilistic reference standard — the Boolean conjunction that defines the four cells must be replaced by a t-norm \(T\), with the standard complement \(N(x) = 1 - x\):
The product t-norm is the only choice for which the resulting cells preserve the row and column marginals,
and hence the only one under which the fuzzy confusion matrix behaves like a
contingency table. marginal_defect() measures departure from that property,
and returns zero only for product.
Note that the pointwise ordering \(T_L \le T_P \le T_M\) applies to all four cell matrices in the same direction, since all four are produced by the same t-norm. It therefore implies nothing about the direction in which a derived ratio moves: numerator and denominator shrink together.
- aggmetrics.tnorms.get_tnorm(name)¶
Resolve a t-norm by name (
'product','godel','lukasiewicz'and aliases), or return a callableT(a, b)unchanged.
- aggmetrics.tnorms.marginal_defect(tnorm, grid=21)¶
Maximum violation of marginal consistency over a grid of
[0,1]^2.Zero iff
T(a,b) + T(a,1-b) == aandT(a,b) + T(1-a,b) == bthroughout, which holds only for the product t-norm.
- aggmetrics.tnorms.godel(a, b)¶
Minimum (Gödel) t-norm: the largest t-norm.
- aggmetrics.tnorms.product(a, b)¶
Product t-norm: the unique marginally consistent choice.
- aggmetrics.tnorms.lukasiewicz(a, b)¶
Łukasiewicz t-norm: credits only overlap above the unit threshold.