跳转至

v0.5.1

Target release for the Feature / WOE hygiene batch.

What Changed

  • Weighted IV now excludes the synthetic missing bucket by default and skips class-degenerate bins instead of returning inf or nan.
  • Weighted_Screen._assign_bins(..., edges=None) now raises a clear ValueError by default. The old "map every non-null value to all" behavior is available through on_null_edges="warn_and_zero".
  • Feature_Screen now passes the current surviving feature list into downstream WOE / PSI / IV stages after the missing-rate stage. Dropped variables are no longer refit later.
  • PSI now supports psi_missing_bucket_policy.
  • Default: "smooth_laplace"
  • Backward-compatible old behavior: "floor_1e6"
  • Strict exclusion path: "exclude"
  • Feature_Insights and the WOE-engine feature patch now record expected per-variable failures in failed_variables and warn once, instead of silently dropping failed variables.
  • WOE_Master now uses SMF_MISSING_BIN as the default missing sentinel instead of -999999.
  • WOE_Master raises a clear error when woe_dict is empty instead of bubbling up ValueError: No objects to concatenate.

Migration Notes

Some metrics can change:

  • Weighted IV may be lower when the previous result was inflated by the missing bucket.
  • PSI can be much smaller for one-sided new buckets because the default no longer floors the missing side to 1e-6.

For exact legacy PSI reports:

PSICalculator(psi_missing_bucket_policy="floor_1e6")

or:

calculate_psi(train, oot, "score", psi_missing_bucket_policy="floor_1e6")

For legacy WOE sentinel behavior without collision:

WOE_Master(train_df, features, dep="badflag", missing_ref_value=-999999)

This now emits a warning because finite sentinel values can collide with real source-system codes. If the data actually contains the sentinel, SMF raises and asks you to use SMF_MISSING_BIN or a truly unreachable sentinel.

New Public Utility

from Modeling_Tool import SMF_MISSING_BIN

Use this when you need to explicitly pass the default WOE missing sentinel.