compute_nauc

probly.evaluation.active_learning.metrics.compute_nauc(scores: Sequence[float]) float[source]

Compute normalized area under the score curve.

Normalizes by the ideal AUC, which is the area under a constant curve at 1.0 spanning the same x-axis range. A NAUC of 0.8 means the observed curve covers 80% of the best possible area. NaN entries (e.g. from an exhausted pool) are excluded while preserving their original iteration indices so that x-axis spacing remains correct.

Parameters:

scores – Per-iteration scores in [0, 1], higher-is-better.

Returns:

Normalized AUC in [0, 1], or NaN if fewer than two finite scores are available. Returns 1.0 when the ideal AUC is zero and all finite scores are equal.