pypi optbinning 1.1.0
OptBinning 1.1.0

18 minutes ago

This release adds sample weight support to the binning process and scorecard, makes BinningProcess a scikit-learn transformer, and extends the plotting and significance testing tools. Weighted cases are handled consistently: sample and class weights drive the weighted binning metrics, while min_bin_size and min_prebin_size continue to count raw records.

New features:

  • Add sample_weight support to OptimalBinning, ContinuousOptimalBinning, BinningProcess and Scorecard for binary and continuous targets #420
  • Add get_feature_names_out to BinningProcess for scikit-learn pipeline compatibility #382
  • Add target_dtype to override the target type detection in BinningProcess #296
  • Allow iv as a selection_criteria metric for continuous targets #307
  • Expose per-bin significance tests through BinningTable.df_tests #283
  • Add a binning process plot grid with an automatic near-square layout, shared metric axes and a shared legend by default #315

Improvements:

  • Make BinningProcess a scikit-learn TransformerMixin, with variable_names now optional #343
  • Vectorize transform() using NumPy and pandas gather operations #388
  • Auto-detect the dtype in OptimalBinning and ContinuousOptimalBinning #316

Bugfixes:

  • Fix min_bin_size and min_prebin_size to count raw records, not class-reweighted mass. Weighted metrics are still computed from the weighted counts. #385
  • Fix the WoE and IV formula in the continuous-target tutorial #370
  • Fix scorecard bin lookup when per-variable transform overrides are used #412
  • Fix NumPy value serialization and categorical state restoration in JSON round trips; preserve unknown categories and mixed values #317
  • Fix streaming binning transform overrides and row alignment #438
  • Fix 2D binning table plot legends showing NumPy scalar representations such as np.int64(1) instead of plain integers.

Packaging and dependencies:

  • Require Matplotlib 3.7 or newer for the shared-legend plotting layout.
  • Add Python 3.14 to the continuous integration matrix and package classifiers.

Documentation:

  • Add a multi-variable overview to the Telco churn tutorial #418
  • Document the plotting API and significance results.
  • Add CONTRIBUTING.md with the contribution guidelines.

Contributors:

  • @lcrmorin: plotting API and grids, significance tests, scikit-learn transformer compatibility, vectorized transform, JSON fixes, and the continuous-target tutorial fix.
  • @josp70: get_feature_names_out implementation
  • @Swapnil-byte-798: fix for streaming binning transform overrides and row alignment

Don't miss a new optbinning release

NewReleases is sending notifications on new releases.