Skip to content

lightgbm/bagging-without-frequency

Rule bagging-without-frequency
Pack LightGBM
Severity warning
Fix none, edit by hand
Library versions every version

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)

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.

Bagging parameters

xpd prints this message with the issue. A name that starts with $ stands for code from your file.

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.

Browse the other rules of the LightGBM pack.