source
LightGBMCV
Create LightGBM CV object.
Example
This shows an example with just 4 series of the M4 dataset. If you want to run it yourself on all of them, you can refer to this notebook.eval_every parameter that can be used to control this, that is, if
eval_every=10 (the default) every 10 boosting iterations we’re going
to compute forecasts for the complete window and report the error.
We also have early stopping parameters:
early_stopping_evals: how many evaluations of the full window should we go without improving to stop training?early_stopping_pct: what’s the minimum percentage improvement we want in theseearly_stopping_evalsin order to keep training?
source
LightGBMCV.fit
Train boosters simultaneously and assess their performance on the complete forecasting window.
compute_cv_preds we get the predictions from each model on
their corresponding validation fold.
The individual models we trained are saved, so calling
predict returns
the predictions from every model trained.
source
LightGBMCV.predict
Compute predictions with each of the trained boosters.
We can average these predictions and evaluate them.
season_length=24 and window_size=7 then we’ll average the value at
the same hour for every day of the week.
setup method.
source
LightGBMCV.setup
Initialize internal data structures to iteratively train the boosters. Use this before calling partial_fit.
partial_fit to only train for some
iterations and return the score of the forecast window.
source
LightGBMCV.partial_fit
Train the boosters for some iterations.

