optbinning/invalid-bin-size
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| optbinning | error | none, edit by hand | All versions |
optbinning validates min_prebin_size and min_bin_size as sample proportions in (0, 0.5], and max_bin_size in (0, 1.0]. Passing percentages such as 5 or non-positive/out-of-range values raises ValueError at fit() time.
optb = OptimalBinning(min_prebin_size=5, min_bin_size=0.6)optb = OptimalBinning(min_prebin_size=0.05, min_bin_size=0.1)What the rule reports
Section titled “What the rule reports”Calls to optbinning binners or BinningProcess passing literal min_prebin_size or min_bin_size outside (0, 0.5], or max_bin_size outside (0, 1.0].
How to fix it
Section titled “How to fix it”Pass fractions in (0, 0.5] for min_prebin_size / min_bin_size and in (0, 1.0] for max_bin_size.
Diagnostic message
Section titled “Diagnostic message”optbinning $PARAM=$VAL is out of range and raises ValueError at fit time. Express min_bin_size and min_prebin_size as fractions in (0, 0.5] (for example 0.05 for 5%).See all rules in the optbinning pack.