Skip to content

Commit 6c5e70f

Browse files
committed
updating for climatological
1 parent c36b242 commit 6c5e70f

File tree

5 files changed

+356
-980
lines changed

5 files changed

+356
-980
lines changed

NAMESPACE

+4-1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export(arx_class_epi_workflow)
136136
export(arx_classifier)
137137
export(arx_fcast_epi_workflow)
138138
export(arx_forecaster)
139+
export(as_epi_df)
139140
export(as_tibble)
140141
export(autoplot)
141142
export(bake)
@@ -182,6 +183,7 @@ export(layer_quantile_distn)
182183
export(layer_residual_quantiles)
183184
export(layer_threshold)
184185
export(layer_unnest)
186+
export(mutate)
185187
export(nested_quantiles)
186188
export(new_default_epi_recipe_blueprint)
187189
export(new_epi_recipe_blueprint)
@@ -200,6 +202,7 @@ export(rename)
200202
export(select)
201203
export(slather)
202204
export(smooth_quantile_reg)
205+
export(snap)
203206
export(step_adjust_latency)
204207
export(step_climate)
205208
export(step_epi_ahead)
@@ -282,11 +285,11 @@ importFrom(hardhat,extract_recipe)
282285
importFrom(hardhat,quantile_pred)
283286
importFrom(hardhat,refresh_blueprint)
284287
importFrom(hardhat,run_mold)
288+
importFrom(lifecycle,deprecated)
285289
importFrom(lubridate,"%m-%")
286290
importFrom(lubridate,leap_year)
287291
importFrom(lubridate,month)
288292
importFrom(lubridate,yday)
289-
importFrom(lifecycle,deprecated)
290293
importFrom(magrittr,"%>%")
291294
importFrom(magrittr,extract2)
292295
importFrom(recipes,bake)

R/climatological_forecaster.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ climatological_forecaster <- function(epi_data,
148148
.by = all_of(args_list$quantile_by_key)
149149
) %>%
150150
rename(.pred_distn = climate_pred) %>%
151-
mutate(.pred_distn = dist_quantiles(.pred_distn, args_list$quantile_levels))
151+
mutate(.pred_distn = hardhat::quantile_pred(do.call(rbind, .pred_distn), args_list$quantile_levels))
152152
# combine them together
153153
climate_table <- climate_center %>%
154154
left_join(climate_quantiles, by = c(".idx", args_list$quantile_by_key)) %>%

R/layer_threshold_preds.R

+5-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ layer_threshold_new <-
6161

6262

6363

64-
# restrict various objects to the interval [lower, upper]
64+
#' restrict various objects to the interval [lower, upper]
65+
#' @param x the object to restrict
66+
#' @param lower numeric, the lower bound
67+
#' @param upper numeric, the upper bound
68+
#' @param ... unused
6569
#' @export
6670
#' @keywords internal
6771
snap <- function(x, lower, upper, ...) {

man/reexports.Rd

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)