neuralforecast
neuralforecast copied to clipboard
AutoNBEATS/AutoNHITS - Questions on model features
Thanks a lot for your continuous support so far!
I have some follow-up questions.
How do we extract the model objects' test loss and test forecasts? Is the final loss we get from the model a validation or test loss? Can we split the train, validation, and test set based on the dates instead of giving the percentages? I would like to include a certain period of data in the train/valid/test set; with percentages, it does not provide the desired splits.
Also, is there a way to plot the train validation loss for all the folds in a chart?
Hi @sdmishra123, you can split the data into sets using the cross_validation
function. You can specify the length of the validation and test sets (measured by the number of timestamps). This function also returns the predictions for the test set. You can recover the forecasts for the train and validation sets with the predict_insample
function (immediately after using the cross_validation
function.
The function only supports specifying the number of timestamps or the number of windows (of size h). You can compute the losses for each set after recovering the forecasts and using any implemented loss.