denselinkage.metrics.ThresholdSweep¶
- class denselinkage.metrics.ThresholdSweep(rows: tuple[tuple[float, LinkageMetrics], ...])[source]¶
Bases:
objectFull precision/recall/F1 curve over a threshold grid. Typed accessor, never a bare
{threshold: f1}dict.- best_f1() tuple[float, LinkageMetrics][source]¶
The
(threshold, metrics)row with the highest F1 (ties broken by the higher threshold). RaisesValueErroron an empty sweep.