lightgbm/bagging-without-frequency
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| LightGBM | warning | none, edit by hand | All versions |
LightGBM leaves row bagging disabled at its default frequency of zero. Setting a row fraction between zero and one has no effect on ordinary bagging unless the frequency is positive.
model = lgb.LGBMRegressor(subsample=0.8)model = lgb.LGBMRegressor(subsample=0.8, subsample_freq=1)How to fix it
Section titled “How to fix it”Set subsample_freq on a scikit-learn estimator or bagging_freq in
native train() or cv() parameters. A frequency of one samples rows
on every boosting round. If you meant to use all rows, remove the fraction.
The rule checks simple decimal fractions and a zero or omitted frequency.
It recognizes a lone bagging_fraction, subsample, sub_row or
bagging with default boosting or explicit GBDT. It skips competing
fraction aliases, settings unpacked from another object, and strategies
such as GOSS. Choose the intended sampling behavior by hand.
Diagnostic message
Section titled “Diagnostic message”LightGBM leaves row bagging off at frequency zero. Set a positive subsample_freq to use the row fraction, or remove the fraction to train on all rows.See all rules in the LightGBM pack.