Skip to content

Commit 4b34428

Browse files
committed
include smoothed_scaling in the targets
1 parent 16dd527 commit 4b34428

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

R/targets_utils.R

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,26 +127,19 @@ make_shared_grids <- function() {
127127
forecaster = "scaled_pop",
128128
trainer = c("linreg", "quantreg"),
129129
ahead = c(1:7, 14, 21, 28),
130-
pop_scaling = c(FALSE)
130+
pop_scaling = FALSE
131131
),
132132
tidyr::expand_grid(
133133
forecaster = "scaled_pop",
134134
trainer = c("linreg", "quantreg"),
135135
ahead = c(1:7, 14, 21, 28),
136136
lags = list(c(0, 3, 5, 7, 14), c(0, 7, 14), c(0,7,14,24)),
137-
pop_scaling = c(FALSE)
137+
pop_scaling = FALSE
138138
),
139139
tidyr::expand_grid(
140140
forecaster = "flatline_fc",
141141
ahead = c(1:7, 14, 21, 28)
142142
),
143-
tidyr::expand_grid(
144-
forecaster = "smoothed_scaled",
145-
trainer = c("quantreg"),
146-
ahead = c(1:7, 14, 21, 28),
147-
lags = list(list(c(0, 3, 5, 7, 14), c(0),c(0, 3, 5, 7, 14), c(0),), c(0, 7, 14), c(0,2,4,7,14,21,28)),
148-
pop_scaling = c(FALSE)
149-
)
150143
)
151144
}
152145
#' Make list of common ensembles for forecasting experiments across projects

covid_hosp_explore.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ make_unique_grids <- function() {
1818
ahead = c(1:7, 14, 21, 28),
1919
lags = list(c(0, 3, 5, 7, 14), c(0, 7, 14)),
2020
pop_scaling = TRUE
21+
),
22+
tidyr::expand_grid(
23+
forecaster = "smoothed_scaled",
24+
trainer = c("quantreg"),
25+
ahead = c(1:7, 14, 21, 28),
26+
lags = list(list(c(0, 3, 5, 7, 14), c(0), c(0, 3, 5, 7, 14), c(0),), list(c(0, 7, 14), c(0)), list(c(0,2,4,7,14,21,28), c(0))),
27+
pop_scaling = TRUE
2128
)
2229
)
2330
}

flu_hosp_explore.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ source("extras/targets-common.R")
55

66
# Add custom parameter combinations in the list below.
77
make_unique_grids <- function() {
8-
list()
8+
list(
9+
tidyr::expand_grid(
10+
forecaster = "smoothed_scaled",
11+
trainer = c("quantreg"),
12+
ahead = c(1:7, 14, 21, 28),
13+
lags = list(list(c(0, 3, 5, 7, 14), c(0), c(0, 3, 5, 7, 14), c(0),), list(c(0, 7, 14), c(0)), list(c(0,2,4,7,14,21,28), c(0))),
14+
pop_scaling = FALSE
15+
)
16+
)
917
}
1018
make_unique_ensemble_grid <- function() {
1119
tribble(

0 commit comments

Comments
 (0)