-
Notifications
You must be signed in to change notification settings - Fork 10
Provide better error/recovery when test lags don't exist ("zero-length inputs [...]") #333
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
Comments
Can you make a simple example without the slide? |
This was referenced Jul 18, 2024
Here's an example. Like with #332, I'm hoping for better error messages that spell out that I'm missing test-time predictors. library(tibble)
library(dplyr)
library(workflows)
library(epiprocess)
library(epipredict)
# [message spam on the above removed]
edf <- tibble(
geo_value = "ct",
time_value = seq(as.Date("2020-10-01"), as.Date("2023-05-31"), by = "day"),
) %>%
mutate(value = seq_len(nrow(.)) + rnorm(nrow(.))) %>%
# Oct to May (flu season, ish) only:
filter(!between(as.POSIXlt(time_value)$mon + 1L, 6L, 9L)) %>%
# and actually, pretend we're around mid-October 2022:
filter(time_value <= as.Date("2022-10-12")) %>%
as_epi_df()
edf %>% arx_forecaster(
"value",
args_list = arx_args_list(lags = c(0L, 7L, 14L)) # (the current default)
)
#> Error in `as_list_of()`:
#> ! Can't find common type for elements of `x`.
edf %>% arx_forecaster(
"value",
trainer = quantile_reg(),
args_list = arx_args_list(lags = c(0L, 7L, 14L)) # (the current default)
)
#> Error in (function (values = double(), quantile_levels = double()) : length(values) == length(quantile_levels) is not TRUE Created on 2024-07-25 with reprex v2.1.1 [#362 has another example.] |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[Please see later comments for actual examples.]
The text was updated successfully, but these errors were encountered: