Slackbot
10/11/2023, 7:37 PMJosé Morales
10/11/2023, 7:57 PMFrancisco
10/11/2023, 8:15 PMMLForecast
object has been instantiated, we can use the cross_validation
method, which takes the following arguments:
• `df`: training data frame with MLForecast
format
• h
(int): represents the h steps into the future that will be forecasted
• n_windows
(int): number of windows used for cross-validation, meaning the number of forecasting processes in the past you want to evaluate.
• `id_col`: identifies each time series.
• `time_col`: indetifies the temporal column of the time series.
• `target_col`: identifies the column to model.
For this particular example, we’ll use 3 windows of 24 hours.
crossvalidation_df = mlf.cross_validation(
df=Y_df,
h=24,
n_windows=3,
)
The crossvaldation_df object is a new data frame that includes the following columns:
• `unique_id`: identifies each time series.
• `ds`: datestamp or temporal index.
• `cutoff`: the last datestamp or temporal index for the n_windows
.
• `y`: true value
• `"model"`: columns with the model’s name and fitted value.José Morales
10/11/2023, 8:17 PMMLForecast.cross_validation?
Francisco
10/11/2023, 8:19 PMFrancisco
10/11/2023, 8:19 PMJosé Morales
10/11/2023, 9:13 PM