Out-of-sample accuracy via modeltime.resample package

Hi,

In the context of model selection, I am performing cross-validation using the function modeltime_fit_resamples() available in the package modeltime.resample using the following code:

resamples_tscv <- time_series_cv(
    data        = df_train,
    date_var    = date, 
    assess      = "2 months",
    initial     = "6 years",
    skip        = "1 month",
    cumulative  = TRUE 
)

resamples_fitted <- models_tbl %>%
    modeltime_fit_resamples(
        resamples = resamples_tscv,
        control   = control_resamples(verbose = TRUE)
    )

resamples_fitted %>%
    modeltime_resample_accuracy() %>%
    table_modeltime_accuracy()

After fitting the best model on the whole training set, I would like to assess its accuracy for the 2-months ahead predictions on an independent test set. Basically, I am looking for a function similar to modeltime_fit_resamples() where the model is kept constant and not fitted on each resample. Does it exist?

Thanks in advance for your help,

Kind Regards,
Alessandro

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.