Research
One theorem lets a fitted partition become a reusable rule. Its proof is machine-checked, and a few exact counterexamples mark where it stops.
The theorem
Take a finite weighted sample of score vectors, split into cells, and let be the Fisher information the cell counts keep. Call the partition stable if no single move of one event to another cell raises . Then, when is nonsingular, every event of a stable partition is strictly nearer the mean score of its own cell than to any other, in the metric of . A stable partition is therefore a Voronoi diagram in score space, and it compiles into a nearest-centroid rule that labels new events. Every globally optimal partition is stable, so the optimum is always such a rule. The user guide (opens in a new tab) shows the call.

Where it stops
Lloyd iteration can go backwards. Moving every event to its nearest centroid in the current metric, all at once, can lower . The library keeps such a step only when the exact objective rises.
A Voronoi partition need not be stable. The converse fails: a partition can be nearest-centroid in that metric and still admit a single move that raises .
Nuisance parameters break the geometry. When nuisance parameters are profiled out (), even a globally optimal partition can violate its own nearest-cell rule. Such a partition does not compile, and a rule has to be fitted directly.
What is new
The exact change in the determinant when one event moves is classical: Banfield and Bassill (1977) used it in a transfer algorithm for clustering, and Fedorov-style exchange in optimal design rests on the same algebra. For a single parameter, binning by the score is score-function quantization (Venkitasubramaniam, Tong and Swami, 2007). The new part is the statement above, for the determinant criterion and a vector parameter.
Proofs and counterexamples
The theorem and the lemmas under it are proved in Lean 4 with Mathlib, in research/formal. The proofs check the mathematics, not the Python code. Each limit above is an exact fixture in tests/fixtures/counterexamples, and the library names the fixture when it refuses a request. A short paper is in preparation.