scikit-learn 1.9 adds metric_at_thresholds: sweep every classification threshold in one call

pandeyparul · x · 2026-09-18

scikit-learn 1.9 introduces metricatthresholds, which computes a binary classification metric at every threshold where predictions can change, returning both metric values and thresholds for easy plotting. The author previously looped over probability cutoffs manually; the new built-in API makes threshold selection based on use-case priorities straightforward.

Original post →

More from coding & agent

coding & agent channel →