sklego/interval-encoder-ignored-span
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| scikit-lego | error | none, edit by hand | All versions |
sklego.preprocessing.IntervalEncoder uses span only for method="normal" and silently ignores it for method="increasing" or method="decreasing". At fit time, any span <= 0 or span > 1 raises ValueError.
enc = IntervalEncoder(n_chunks=8, span=0.5, method="increasing")enc = IntervalEncoder(n_chunks=8, method="increasing")What the rule reports
Section titled “What the rule reports”Calls to IntervalEncoder that pass span alongside method="increasing" or method="decreasing", or pass a numeric literal span outside (0, 1].
How to fix it
Section titled “How to fix it”Omit span for monotonic method="increasing" or method="decreasing", or supply 0 < span <= 1 with method="normal".
Diagnostic message
Section titled “Diagnostic message”IntervalEncoder ignores span when method is "increasing" or "decreasing". Drop span or use method="normal".See all rules in the scikit-lego pack.