Repository navigation
docs: document compatibility with WOE-transformed features - #84
Conversation
Add docs/howto/woe.md covering what the artifact holds for WOE columns, band construction on a plateaued latent, reason dictionaries written against the underlying attribute, the sign of monotone constraints in WOE units, and how a missing bin differs from NaN. It ends with what has not been tested. tests/test_woe_inputs.py pins each statement on seeded synthetic WOE data: parity with the source model for sklearn, XGBoost and LightGBM, thresholds between bin values, one band per bin combination, within-band AUC, reasons, baseline behaviour, constraint signs, missing-bin handling and metadata. Closes orgoca#18
|
Thank you @bh_official!! This is a great first contribution: every claim pinned by a test, the One change before merging, in "Monotone directions": "Declaring the wrong sign Two optional suggestions:
I approved the CI run: all 20 checks pass, including the test matrix on three |
…is not caught A review pointed out that the build only raises when the declared monotone direction disagrees with how the trees were trained. If the same wrong sign is used for both, the build passes and the cost shows up as lost discrimination, so say that explicitly. Also describe the baseline compile_selected uses (the per-column median of the development rows, which for a WOE column is a bin's value except at an exact tie), and draw the missing-bin test rows from the riskier rows so the trees are certain to split them off the baseline bin.
|
Thanks, all three are in the new commit.
|
|
All three in, and the mutation check on the new test is exactly right. |
Closes #18
What
The docs said nothing about WOE-transformed inputs. This adds
docs/howto/woe.md, linked from the nav, the docs index, the README list and the changelog. It covers the interactions the issue lists:metadataNaNPer "Claims are tests", every statement on the page is pinned by
tests/test_woe_inputs.py(11 tests, seeded synthetic data, four WOE columns of 3-4 bins each). Where I did not measure something, the page says so instead of guessing, e.g. whether WOE inputs change the certified band count compared with raw features.How I checked
I also broke the code under test to confirm the new tests can fail: flipping the adverse/favorable sign in
format_reasons, disabling the monotone check inbuild_artifact, and imputing0.0instead of the baseline for missing inputs each make a test in the new file fail.mypy src/compilemlreports 58 errors in my environment (missing stubs for scipy and sklearn); the count is the same with and without this change.cobcis not installed here, so the COBOL parity test skips.