-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modeltime_fit_resamples does not work with ensemble #12
Comments
+1 |
For those who stumble up on this question. Then here is a sample code showing how you can do this with a for loop. library(modeltime) data_tbl <- walmart_sales_weekly %>% Create splitssplits <- data_tbl %>% time_series_cv(date_var = date, assess = 12, skip = 1, cumulative = TRUE, slice_limit = 5) initial_fit_data_tbl <- splits$splits[[nrow(splits)]] %>% training() Create models and ensemblearima_mtbl <- arima_reg() %>% ets_mtbl <- exp_smoothing() %>% models_mtbl <- combine_modeltime_tables( ensemblemodels_mtbl <- models_mtbl %>% Cross validateThis does not workmodels_mtbl %>% Use for loop insteadaccuracy_ls <- list() # to store the accuracy calculations in for(i in 1:nrow(splits)) {
} Collect accuracy calculationsaccuracy_tbl <- accuracy_ls %>% bind_rows() Calculate mean accuracy per model and arrange by mean rmseaccuracy_tbl %>% |
This code will run but the ensemble is not present when I calculate accuracy:
I.e. the output of modeltime_resample_accuracy() will only include the models, not the ensemble.
Same if I have a table with stacked ensembles and try to run this:
Session info:
The text was updated successfully, but these errors were encountered: