Hello everyone! I want to create a one model per step where each model predicts the next 21 days in increments of 7 days. I wasn't sure about the interaction between
lightgbm.cv and max_horizon. I was wondering if someone could let me know whether there is an example for this case. ( I couldn't find one on GitHub or the main page )
lgb_cv = LightGBMCV(
freq='d',
lags=[7, 14],
lag_transforms={
7 : [
ExpandingMean(),
]
)
cv_hist = lgb_cv.fit(
sales_pd,
n_windows=4,
h=21,
dropna=False,
metric=comp_loss,
num_iterations=10_000,
params={'verbosity': -1, 'learning_rate': 0.2, 'num_leaves': 128},
early_stopping_evals=5,
)
mlf = MLForecast.from_cv(lgb_cv)
mlf.fit(sales, dropna=False)
preds = mlf.predict(h=7,max_horizon=21)