Repository navigation
0.9.2: keep a rare two-valued column's bin in the WoE floor - #81
Merged
Merged
Conversation
fit_reference bins each feature with a shallow tree whose leaves must hold at least 2% of rows. A two-valued column whose rarer value fell below 2% could not be split, so it landed in one bin with no information and the floor ignored it. On public hospital-readmission data (#76) that dropped one-hot columns for rare discharge outcomes, including patients who died (1.5% of rows, never readmitted), and held the floor's Gini at 0.235 instead of 0.300. A column with exactly two values is already binned, so it is now cut between the two values, where the tree would, whatever the rarer value's share. The 2% minimum still governs the cut points a tree chooses on columns with more values. A 0/1 column the tree could already split gets the same cut as before, and data with only continuous columns, the benchmark's included, is unaffected.
The WoE floor no longer ignores rare 0/1 columns. A patch release: no change to the runtime, the exporters, the artifact schema, or the benchmark, whose features are all continuous. On data with rare two-valued columns the floor gets stronger, so a floor gate or check 10 that passed may now fail. Also corrects 0.9.1's changelog date to its release day, 2026-10-10.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A patch: the WoE floor no longer ignores rare 0/1 columns. No change to the runtime, the exporters, the artifact schema, or the benchmark, whose features are all continuous.
The bug
fit_referencebins each feature with a shallow tree whose leaves must hold at least 2% of rows. A two-valued column whose rarer value fell below 2% couldn't be split, so it landed in one bin and carried no information.This surfaced in the #76 gate experiment on Diabetes 130-US Hospitals. One-hot columns for rare discharge outcomes were lost, among them patients who died: 1.5% of rows, never readmitted. The same split, on all patients:
This matters because
compile_selected's floor gate compares against this model, and so does check 10 when given a fitted reference. A weakened floor let through artifacts a fair one would have stopped. 0.9.1 also advises adding 0/1 missing-indicator columns, which is exactly the kind of column the floor dropped.The fix
A column with exactly two values is already binned, so it's cut between the two values, where the tree would, whatever the rarer one's share. The 2% minimum still governs the cut points a tree chooses on columns with more values, which is what it exists for. A 0/1 column the tree could already split gets the same cut as before.
Behaviour change: on data with rare two-valued columns, the floor gets stronger. A floor gate or check 10 that passed may now fail. That is the fix working, and the changelog says so.
Release
The second commit bumps to 0.9.2 (
__init__, CITATION.cff, CHANGELOG). It also corrects 0.9.1's changelog date to its release day, 2026-10-10. The benchmark doesn't move;results.jsonstays as the 0.9.0 run.Checks