Skip to content

optbinning

The optbinning pack checks supervised monotonic binning leakage, monotonic trend names, bin-size and user-split contracts, continuous binning metrics, and Scorecard scaling parameters against optbinning 1.1.0 on files that import optbinning.

Rules Safe fix Unsafe fix Manual fix
6 0 0 6
Rule Severity Fix What it finds
binning-before-split error none Supervised optbinning transformers (OptimalBinning, ContinuousOptimalBinning, MulticlassOptimalBinning, BinningProcess, MDLP, OptimalPWBinning, SBOptimalBinning) use target y to choose bin cutpoints and Weight-of-Evidence or bin-mean values.
Rule Severity Fix What it finds
invalid-monotonic-trend error none optbinning uses "ascending" and "descending" (plus "auto", "auto_heuristic", "auto_asc_desc", "concave", "convex", "peak", "valley", "peak_heuristic", "valley_heuristic", or None) for monotonic_trend.
user-splits-fixed-without-user-splits error none user_splits_fixed marks which entries of user_splits the solver must keep unchanged.
invalid-bin-size error none optbinning validates min_prebin_size and min_bin_size as sample proportions in (0, 0.5], and max_bin_size in (0, 1.0].
continuous-binning-woe-metric error none ContinuousOptimalBinning bins predictors against a continuous target and supports metric="mean", "indices", or "bins".
Rule Severity Fix What it finds
scorecard-scaling-config error none optbinning.Scorecard requires scaling_method to be "pdo_odds" or "min_max" (note that optbinning's own error message misprints "pd_odds"), requires a matching scaling_method_params dict whenever scaling_method is set, and rejects rounding=True when scaling_method is None.