@@ -209,31 +209,16 @@ get_flu_forecaster_params <- function() {
209
209
tidyr :: expand_grid(
210
210
forecaster = " scaled_pop_seasonal" ,
211
211
trainer = " quantreg" ,
212
- lags = list2(
213
- c(0 , 7 )
212
+ lags = list2(c(0 , 7 )),
213
+ seasonal_method = list2(
214
+ list2(" window" ),
215
+ list2(" window" , " flu" ),
216
+ list2(" window" , " climatological" )
214
217
),
215
- seasonal_method = list (" flu" , " indicator" , " climatological" ),
216
- pop_scaling = FALSE ,
217
- train_residual = c(TRUE , FALSE ),
218
- filter_source = c(" " , " nhsn" ),
219
- filter_agg_level = " state" ,
220
- drop_non_seasons = c(TRUE , FALSE ),
221
- n_training = Inf ,
222
- keys_to_ignore = g_very_latent_locations
223
- ),
224
- # Window-based seasonal method shouldn't drop non-seasons
225
- tidyr :: expand_grid(
226
- forecaster = " scaled_pop_seasonal" ,
227
- trainer = " quantreg" ,
228
- lags = list (
229
- c(0 , 7 )
230
- ),
231
- seasonal_method = list (" window" , c(" window" , " flu" ), c(" window" , " climatological" )),
232
218
pop_scaling = FALSE ,
233
219
train_residual = c(FALSE , TRUE ),
234
220
filter_source = c(" " , " nhsn" ),
235
221
filter_agg_level = " state" ,
236
- drop_non_seasons = FALSE ,
237
222
n_training = Inf ,
238
223
keys_to_ignore = g_very_latent_locations
239
224
)
@@ -250,7 +235,7 @@ get_flu_forecaster_params <- function() {
250
235
c(0 , 7 ) # exogenous feature
251
236
)
252
237
),
253
- seasonal_method = " window" ,
238
+ seasonal_method = list2( " window" ) ,
254
239
pop_scaling = FALSE ,
255
240
filter_source = c(" " , " nhsn" ),
256
241
filter_agg_level = " state" ,
@@ -262,10 +247,8 @@ get_flu_forecaster_params <- function() {
262
247
season_window_sizes = tidyr :: expand_grid(
263
248
forecaster = " scaled_pop_seasonal" ,
264
249
trainer = " quantreg" ,
265
- lags = list (
266
- c(0 , 7 )
267
- ),
268
- seasonal_method = " window" ,
250
+ lags = list2(c(0 , 7 )),
251
+ seasonal_method = list2(" window" ),
269
252
pop_scaling = FALSE ,
270
253
train_residual = FALSE ,
271
254
filter_source = c(" " , " nhsn" ),
@@ -325,9 +308,6 @@ get_flu_forecaster_params <- function() {
325
308
x $ forecaster <- " dummy_forecaster"
326
309
}
327
310
x <- add_id(x )
328
- if (" trainer" %in% names(x ) && is.list(x $ trainer )) {
329
- x $ trainer <- x $ trainer [[1 ]]
330
- }
331
311
# Add the outcome to each forecaster.
332
312
x $ outcome <- " hhs"
333
313
x
0 commit comments