optbinning/user-splits-fixed-without-user-splits
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| optbinning | error | none, edit by hand | All versions |
user_splits_fixed marks which entries of user_splits the solver must keep unchanged. Providing user_splits_fixed without user_splits raises ValueError: user_splits must be provided. when fit() runs.
optb = OptimalBinning(user_splits_fixed=[True, False])optb = OptimalBinning(user_splits=[10.0, 25.0], user_splits_fixed=[True, False])What the rule reports
Section titled “What the rule reports”Calls to optbinning binners passing a non-None user_splits_fixed without a non-None user_splits argument.
How to fix it
Section titled “How to fix it”Provide user_splits with the same length as user_splits_fixed, or omit user_splits_fixed to let the solver optimize all cutpoints.
Diagnostic message
Section titled “Diagnostic message”Passing user_splits_fixed without user_splits raises ValueError ("user_splits must be provided") at fit time. Supply user_splits of the same length or omit user_splits_fixed.See all rules in the optbinning pack.