@@ -13,7 +13,7 @@ check_exist <-function(to_check,ret){
1313forecast_horizon <- 3
1414target_variable <- " value"
1515combo_variables <- c(" id" )
16- models_to_run <- c( " meanf " , " snaive" )
16+ models_to_run <- " snaive"
1717inp_data <- modeltime :: m750 %> %
1818 dplyr :: rename(Date = date ) %> %
1919 dplyr :: mutate(id = as.character(id )) %> %
@@ -27,13 +27,13 @@ finn_forecast <- forecast_time_series(
2727 date_type = dt_type ,
2828 forecast_horizon = forecast_horizon ,
2929 run_model_parallel = FALSE ,
30- back_test_scenarios = 6 ,
30+ back_test_scenarios = 3 ,
3131 models_to_run = models_to_run ,
3232 run_global_models = FALSE ,
3333 run_ensemble_models = FALSE )
3434
3535final_fcst <- finn_forecast $ final_fcst %> %
36- mutate(Date = as.Date(Date ))
36+ dplyr :: mutate(Date = as.Date(Date ))
3737back_test_data <- finn_forecast $ back_test_data
3838back_test_best_MAPE <- finn_forecast $ back_test_best_MAPE
3939
@@ -135,7 +135,9 @@ finn_forecast <- forecast_time_series(
135135 run_model_parallel = FALSE ,
136136 back_test_scenarios = 3 ,
137137 models_to_run = models_to_run ,
138- run_global_models = FALSE )
138+ recipes_to_run = " R1" ,
139+ run_global_models = FALSE ,
140+ run_ensemble_models = FALSE )
139141
140142final_fcst <- finn_forecast $ final_fcst %> %
141143 mutate(Date = as.Date(Date ))
@@ -217,7 +219,9 @@ inp_data <- hts::infantgts %>%
217219 dplyr :: mutate(Date = as.Date(paste0(index , " -07-01" ))) %> %
218220 dplyr :: select(- c(" Total" , " Sex/female" , " Sex/male" , dplyr :: contains(" State/" ))) %> %
219221 tidyr :: pivot_longer(- c(" index" , " Date" ), names_to = " id" ) %> %
220- tidyr :: separate(id , sep = " " , into = c(" State" , " Sex" ), remove = FALSE )
222+ tidyr :: separate(id , sep = " " , into = c(" State" , " Sex" ), remove = FALSE ) %> %
223+ dplyr :: filter(Date > = " 1985-07-01" ,
224+ State %in% c(" NSW" , " VIC" ))
221225
222226inp_data_combos <- inp_data %> %
223227 dplyr :: mutate(Combo = paste0(State , Sex ))
@@ -234,7 +238,9 @@ finn_forecast <- forecast_time_series(
234238 run_model_parallel = FALSE ,
235239 back_test_scenarios = 3 ,
236240 models_to_run = models_to_run ,
237- run_global_models = FALSE )
241+ recipes_to_run = " R1" ,
242+ run_global_models = FALSE ,
243+ run_ensemble_models = FALSE )
238244
239245final_fcst <- finn_forecast $ final_fcst %> %
240246 mutate(Date = as.Date(Date ))
0 commit comments