WRITE · TRACE · UNDERSTAND
Threshold Sweep
One score can produce different decisions.
Your experiment
choose_threshold(scores, labels, candidates) returns the candidate with greatest binary F1, choosing the smallest on a tie. A score >= threshold predicts 1; candidates is nonempty.
Python runs in your browser. Your draft stays on this device.
What to look for
One score can produce different decisions. Compare F1 at candidate thresholds on validation labels; break equal scores toward the smaller threshold.
Watch your code work
Ready to experimentWrite a solution or load the worked answer, then choose Trace & check.
Step through arrays, variables and training curves produced by your own Python.