跳转至

v0.5.7

Patch release closing the two residuals from the 2026-07-12 full retest: categorical features in weighted feature screening, and lr model NaN handling in the reject-inference pipeline.

Feature Screening

  • The weighted shared-WOE-bins screen no longer hard-casts declared categorical features to float at the IV stage. IV is computed from the assigned bins; the missing-rate input now uses notna semantics for non-numeric columns (numeric columns are unchanged, bit-for-bit).
  • The raw-value correlation stage (corr_use_woe_bins=False) skips non-numeric features instead of crashing: numeric features are correlated under the configured corr_nan_policy, categorical features are kept through the stage with a UserWarning and can never be dedup-dropped.
  • FeatureValidationPipeline selection now forwards categorical_features into the screening config, so a selection run that fits its own screening binner declares categorical features correctly.
  • Known limitation (unchanged): the unweighted screen path still fails on categorical features at the correlation stage inside CorrelationFilter/var_corr_filter. Workarounds: pass a weight_col, disable corr_enabled, or exclude categorical features from screening.

Reject Inference

  • New RejectInferencePipelineConfig.lr_nan_handling ("fillna_median" default, "fillna_mean", "fillna_0", "raise") makes prescore_model_type="lr" and ri_model_type="lr" usable on real NaN/Inf-bearing feature frames. GBM backends are unaffected.
  • Fill values are computed on the training frame only (±Inf treated as missing; all-NaN columns fall back to 0.0), applied with a UserWarning naming the affected feature count, and re-applied at every predict call through a picklable wrapper — training and scoring can never drift onto different imputations.
  • Saved lr models persist lr_nan_handling and lr_fill_values in the artifact metadata envelope; reloaded models score raw NaN-bearing frames identically to the in-memory model.
  • lr_nan_handling="raise" fails fast with the offending feature names when imputation is not wanted.

Behavior Notes

  • lr models returned by the RI pipeline (result.prescore_model, result.ri_models[...]) are now wrapped with their fill values; attribute access delegates to the underlying LRMaster. Previously this configuration raised ValueError: Input X contains NaN on real data, so no working setup changes numerically.
  • New UserWarnings are emitted when lr features are imputed and when raw-value correlation skips categorical features. Suites running -W error::UserWarning should whitelist or handle these.

Validation

  • Full local pytest suite: 625 passed, 0 skipped.
  • Source package verification and wheel/sdist build passed (tasks.py verify).
  • Documentation passed mkdocs build --strict.
  • Regression coverage added in test_pipeline_056_residuals.py (categorical screening IV/corr/FVP selection; lr NaN fill, raise mode, save/load round-trip).