v0.6.8¶
Patch release closing the weighted-path audit opened by the 0.6.7 defect review: the G02 IV upper band now catches hard leakage on every screen path, and the G03/G04 selection-evidence chain plus G05/G06 ranking honor weight_col. All default-config and unweighted outputs are byte-identical to 0.6.7 (regression-asserted).
G02 IV Upper Band: Hard-Leak Coverage on All Paths¶
- Defect (field case, FT-weighted CDC run):
iv_upper_thresholddropped a leak feature on the unweighted monotone-engine path but not withweight_colset. Root cause was the IV basis, not the gate wiring: the weighted IV excludes class-degenerate bins (iv_guard), and a hard leak makes bins class-PURE — the strongest possible signal contributed nothing (a feature with engine IV ≈ 24 measured 0.6–1.7 weighted; fully-pure features measured 0.0). The legacy gains-table path zeroes pure bins the same way (filliv); only the monotone-engine report basis was immune. - Fix:
_weighted_iv_detailcomputes, in the same pass, a zero-cell-FLOORED IV alongside the legacy degenerate-guarded IV — bin class shares floored atcontent(the PSI floor, default1e-6), matching the WOE-engine convention; features without degenerate bins getiv_floored == ivexactly. Wheniv_upper_thresholdis armed, every dispatch path gates the upper band on the floored IV; the gains-table and engine-IV paths obtain the diagnostic via a unit-weight floored computation. - Upper-band drops keep
reason=iv_above_upperand now recordmetric=iv_flooredwith the floored value indropped_detail. Reportediv_weightedvalues,iv_tablecolumn sets, warnings and ranking metrics stay on legacy semantics;iv_upper_threshold=Nonecomputes no floored IV at all.
G03/G04 Selection Evidence: Weighted Basis¶
- Defect: the entire SelectionEvidence chain ignored
weight_col— per-group IVs, per-target IVs and point-biserial directions were computed unweighted even when the pipeline ran weighted, so group-stability and multi-target gate decisions were made on a basis that does not match the modeling weights. (Investigation also corrected the 0.6.7 known-limitation wording: the evidence IV never had theiv_guardpure-bin exclusion — it uses the+1e-6smoothed report formula.) - Fix:
_evidence_ivandpoint_biserial_directiongainsample_weight;_build_selection_evidenceresolvesweight_colonce on INS and re-slices positionally per group / per target. Weighted bincounts keep the same smoothing formula family as the ivks report;max(total, 1.0)floors are kept verbatim so a zero-mass slice degrades toiv == 0.0, never NaN. - The
ncolumn stays a raw observation count (min_group_ngauges statistical sufficiency, which weights do not add to). Stage-table column sets are unchanged;selection_config_snapshotrecords the newevidence_weight_col. - Unit-weight runs (
weight_colof all 1.0) reproduce unweighted evidence tables bit-exactly; unweighted runs are byte-identical.
G05/G06 Ranking Basis: Conditional Floored Switch¶
- Defect:
gate_iv_mapfed G05 truncation ranking and the G06 VIF tie-break the degenerate-guarded IV, so legitimate features with class-pure bins ranked artificially low and could be truncated in favor of weaker features. - Fix: new
_gate_ranking_iv_map— wheniv_upper_thresholdis armed (leaks are already dropped by the band), finite floored IVs replace the guarded values for ranking;upper=Nonereturns the legacy map verbatim (conservative against leaks). Behavior changes only under the doubly opt-in combination (upper band armed AND truncation/VIF armed).
Behavior Notes¶
- Byte-identical outputs for default configs, unweighted runs, and
iv_upper_threshold=None(regression-asserted, including bit-exact unit-weight parity). - Weight validation (NaN/inf/negative/all-zero raise) now fires at evidence build time for weighted runs with G03/G04 armed — the same exception class the weighted screen already raises, just earlier.
- Known follow-up: legacy unarmed G05/G06 ranking still uses the per-path legacy IV bases (locked verbatim by regression tests); a basis unification remains available for a future minor if desired.
Validation¶
- Full local pytest suite:
831 passed, 0 skipped(22 new regressions across the two batches: hard-leak upper band on four paths, weighted evidence flips, unit-weight parity, ranking-basis two-state). - CI green across the legacy/modern/bleeding × Python 3.11/3.12 matrix, source package checks, and version-consistency check.
- Source package verification and wheel/sdist build passed (
tasks.py verify).