Skip to content

Updated musings #78

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

Merged
merged 4 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions man/create_layer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions musings/example-recipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ library(tidyverse)
library(covidcast)
library(delphi.epidata)
library(epiprocess)
# library(epipredict)
library(tidymodels)

x <- covidcast(
data_source = "jhu-csse",
signals = "confirmed_7dav_incidence_prop",
Expand Down Expand Up @@ -40,10 +40,7 @@ r <- epi_recipe(x) %>% # if we add this as a class, maybe we get better
step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
step_epi_ahead(death_rate, ahead = 7) %>%
step_epi_lag(case_rate, lag = c(0, 7, 14)) %>%
step_naomit(all_predictors()) %>%
# below, `skip` means we don't do this at predict time
# we should probably do something useful here to avoid user error
step_naomit(all_outcomes(), skip = TRUE)
step_epi_naomit()

# specify trainer, this uses stats::lm() by default, but doing
# slm <- linear_reg() %>% use_engine("glmnet", penalty = 0.1)
Expand Down