Skip to content
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

Solutions for 04_regularization #67

Open
leahhrlee opened this issue Oct 11, 2023 · 1 comment
Open

Solutions for 04_regularization #67

leahhrlee opened this issue Oct 11, 2023 · 1 comment

Comments

@leahhrlee
Copy link

Solutions for 04_regularization should include:

Import data

penguins <- palmerpenguins::penguins %>%
filter(!is.na(bill_length_mm))

Set seed

set.seed(23)

Perform split

penguin_split <- penguins %>% initial_split(prop = 0.80)
penguins_train <- training(penguin_split)
penguins_test <- testing(penguin_split)

Participants will run into error if null values in bill_length_mm are not dropped

@leahhrlee
Copy link
Author

If not filtered, this error will occur: "Error in if (nulldev == 0) stop("y is constant; gaussian glmnet fails at standardization step") :
missing value where TRUE/FALSE needed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant