Slackbot
01/04/2024, 12:22 PMLayon Hu
01/04/2024, 1:44 PMnf = NeuralForecast(models=models, freq='s')
Y_hat_df = nf.cross_validation(df=data, val_size=val_size,
test_size=test_size, n_windows=None)
results = nf.models[0].results.trials_dataframe()
If you want to view the training process of each trail, you can use tensorboard to view it. Use the following code to view the training results in the lightning_logs folder generated in the same directory as your code.
# (nixtla_auto) C:\Users\Windows 10>tensorboard --logdir="F:\postguaduate\vibration\various model test\NIXTLA\new data\DeepAR\IMF7\lightning_logs"
You need to replace the file path in double quotes with your path.Cristian (Nixtla)
01/08/2024, 4:01 PMcross_validation
is to precisely get the out-of-sample predictions on the test set. The best model on the validation set is used to return the forecasts on the test set. All auto models have a refit_with_val
parameter, that you can set to True
to retrain the best model also using the validation set before doing the predictions on the test set.Cristian (Nixtla)
01/08/2024, 4:01 PMcross_validation
and not two.Florian Stracke
01/09/2024, 3:51 PMCristian (Nixtla)
01/20/2024, 3:43 PMcross_validation
function is doing with the AutoModels. In your plot, the validation set would correspond to the three red months, from march to may.Asad Abbas
02/09/2024, 4:19 AMretrain
the best model separately on complete data (train+val)
using best parameters and do .fit
and .predict
.
What I understood from above discussion that, we can simply use refit_with_val
and let the best model train on complete data including validation data, and let it make predictions on the test data.
In my case, I want to make future predictions and I'm using future exogenous variables as well, so I will have complete data
train + val + test (missing target variable, but containing future exogenous variables)
so i can make out of sample predictions
on the test data using the best model trained on complete (train + val)
data.Cristian (Nixtla)
02/09/2024, 4:05 PMAsad Abbas
02/11/2024, 9:38 PMtrain + val + test (dummy target variable, but containing future exogenous variables)
and use cross-validation to select the best model and use refit_with_val
and get out of sample predictions on the test set would that work?