v0.6.7¶
Patch release landing the remaining P1/P2 audit items from the defect review batch (G00, G02-G09, G17 selection/binning governance + G01 SAP split materialization). All new fields default to legacy behavior — default-config outputs are byte-identical to 0.6.6 (regression-asserted).
WOE Fit Ordering & Engine Reuse (G00)¶
woe_fit_scope—'all'(legacy default) or'post_missing_gate'. The gated survivor set feeds every WOE-consuming downstream stage (PSI/IVKS/corr/selection); gated features keep distribution diagnostics plus awoe_artifacts['missing_gate_dropped']table.- Screens now attach their self-fitted monotone binner to
WeightedScreenResult.woe_engine(+woe_engine_meta); newwoe_artifacts_from_screen_resultwraps it into the CM_reuse_screening_woecontract andfrom_screen_resultauto-calls it.WOE_Masterengines are never attached (they holdtrain_data) — woe_table + meta +UserWarningonly.
Selection Gates: IV Band, VIF, Group/Multi-Target, Truncation (G02-G06)¶
iv_upper_threshold(G02) on all four screen paths via shared_iv_band_keep; drops recordreason='iv_above_upper'in the newdropped_detailframe (var/stage/metric/value/threshold/reason) alongsidestage_tables.- G03/G04/G05 — new
Feature/Screen_Gates.py:SelectionEvidence(lazy per-group / per-target IV+direction closures priced on post-corr survivors), gate ordervif -> group_stability -> multi_target -> truncation, sharedpoint_biserial_direction. FVP builds evidence fromselection_group_dims; configured gates without evidence (CMP path) raise atfeature_screenentry. Truncation is always last and never backfills. - G06 —
compute_vif's statsmodels import now raises an actionableImportErrornaming the optional extra (pip install "SuperModelingFactory[stats]"); the screen-sideapply_vif_stageguards likewise before mutating anything. - All thresholds recorded in
selection_config_snapshot.
LR P-Value Backward Elimination (G07)¶
lr_elimination_mode='pvalue'+lr_elimination_params(pvalue_threshold=0.05, min_features=1, max_iterations=20, tie_breaker). Post-fit loop drops the worst-p feature and refits until every coefficient clears the threshold; p-values come from the scipy Fisher-information summary of the exact shipped sklearn model.- New
fast_lr_pvaluesis the vectorized O(n·k) equivalent ofget_lr_statsmodel_summary's p-value column (the legacy path builds an n×n diagonal weight matrix — unusable in loops at pipeline sample sizes). - Trace lands in
feature_selection_summary['lr_elimination']+lr_pvalue_elimination.csv;models['lr']carries the reduced varlist so eval/explain follow. Mode/params validated in_validate_input; trace resets per_train_modelscall so pipeline instance reuse cannot leak a stale trace.
Binner Governance: Small Bins, Direction, Missing Strategy, Refine Floor (G08/G09/G17)¶
MonotoneWOEBinner gains eight opt-in governance params (all default None/'auto' = byte-identical legacy behavior):
- G08 —
min_bad_count/min_good_count/small_bin_policy(merge,warn,raise).mergecollapses toward the WOE-closer neighbor recordingmerge_trace;warn/raisename feature, bin and counts. - G09 —
monotone_direction(str or per-feature dict) /reference_target(point-biserial sign) /direction_conflict_policy(warn,raise,keep). Direction resolves beforecopy.copy(self)so parallel workers inherit it. Newget_direction_summary()reports feat/direction/basis/is_monotonic. - Missing-bin semantics:
missing_bin_strategy(empirical_special,fixed_woe,fail) with fit-time coherence checks. - G17 —
refine_dtree(max_depth=)caps tree depth;refine_min_n_bins_policy(warn,enforce,raise) stops refinement from collapsing belowmin_n_bins(enforcekeeps prefit bins). - Governance raises use
BinningPolicyViolation(ValueError), piercing the historic per-feature fault tolerance; governance warns areUserWarning.
Verifiable Row-Level Split Materialization (G01)¶
- SAP
materialize_split=True+id_colreplays each target's recommended (window, ratio, seed) through_materialize_one_split— the exact index generator extracted from candidate scoring, so statistics and materialized membership are identical by construction. - Output:
row_level_split([id_col, target_col, split_col_name]) +split_artifact(seed, ratio,oot_basis='window'|'cutoff', counts, sha256 ID hashes per segment,smf_version). oot_cutoffoverrides the trailing window (OOT =oot_time_dim >= cutoff). Loud integrity: duplicate ids raise with counts; segments are pairwise exclusive; coverage equals the mature-row set.persist_split_mapwritesrow_level_split.csv+split_artifact.jsonintooutput_paths. Materializing withoutid_colis rejected at validation.
GUI Field Metadata Sync¶
- Labels for the selection gates (G02-G06),
woe_fit_scope,selection_group_dims,lr_elimination_mode/params (G07), and the SAP materialization fields (G01). - New option enums:
insufficient_group_policy(keep_warn,drop,raise),target_rules(all,any,min_pass_count). monotone_woe_paramsnested fields for the eight binner governance params.
Behavior Notes¶
- Byte-identical outputs under default configs (regression-asserted).
- Announced default flips (next minor, 0.7.0):
woe_fit_scope'all'→'post_missing_gate'andrefine_min_n_bins_policyNone→'warn'— joining the already-announcedgains_ascendingNone→True,synthesize_missing_ootNone→False,search_eval_splitsNone→["oos"], andbackward_report_splitsNone→[].
Validation¶
- Full local pytest suite:
809 passed, 0 skipped(88 new governance/selection/split-materialization regressions on top of the 0.6.6-era 721 baseline). - 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).