feature_engine/quantiles-capping-invalid-fold
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| Feature-engine | error | none, edit by hand | All versions |
Winsorizer and OutlierTrimmer with capping_method="quantiles" interpret fold as a tail quantile in (0, 0.20] (default "auto" = 0.05) and raise ValueError for values outside that range, such as IQR multipliers (1.5, 3) or upper percentiles (0.95).
capper = Winsorizer(capping_method="quantiles", fold=1.5)capper = Winsorizer(capping_method="quantiles", fold=0.05)What the rule reports
Section titled “What the rule reports”Calls to Winsorizer or OutlierTrimmer with capping_method="quantiles" and a numeric fold literal outside (0, 0.20].
How to fix it
Section titled “How to fix it”Pass a tail fraction in (0, 0.20] (such as 0.05) or fold="auto".
Diagnostic message
Section titled “Diagnostic message”With capping_method='quantiles', Feature-engine requires fold in (0, 0.20] or 'auto' and raises ValueError otherwise. Pass a tail quantile such as fold=0.05 or fold='auto'.See all rules in the Feature-engine pack.