Leonie
08/21/2023, 7:02 PMnf.fit(df_train, df_val)
Cristian (Nixtla)
08/23/2023, 3:46 PMval_size
parameter of the fit
method.Leonie
08/23/2023, 4:29 PMCristian (Nixtla)
08/23/2023, 4:33 PMcore
function. In particular, use the cross_validation
method with the desired val_size
and test_size
. Models will be trained on the train set, using validation set for early stopping and model selection. You can use one of our auto
models that will automatically perform hyperparameter selection on this validation set. The cross_validation
method will return the forecasts for the test set so you can evaluate/plot performance afterwardsLeonie
08/23/2023, 4:34 PMCristian (Nixtla)
08/23/2023, 4:37 PMstep_size
should be 24. Something like this should work:
cross_validation(df=train_data,
val_size=24*31, # october
n_windows=31, # Number of forecasts of size 33 (31 days for december)
step_size=24) # You are producing forecasts every day, so step size between forecasts is 24
You need to be careful to end your data the last hour of December, so that forecasts are produced exactly at 2pm the day before. You can check the cutoff
column in the dataframe returned by cross_validation
to check if forecasts are produced at 2pm.fit
function once, and then define a for loop of predict
functions, adding more data each time to produce the next forecast.Leonie
08/23/2023, 8:02 PMCristian (Nixtla)
08/23/2023, 8:03 PMmax_steps
hyperparameter to limit training