-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged origin/main into survival-workflows-tests
- Loading branch information
Showing
24 changed files
with
371 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ Suggests: | |
tibble, | ||
tidyr, | ||
tune, | ||
withr, | ||
workflows, | ||
workflowsets, | ||
xgboost, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
# error traps | ||
|
||
Code | ||
poisson_reg(penalty = 0.1) %>% set_engine("glmnet") %>% fit(mpg ~ ., data = mtcars[ | ||
-(1:4), ]) %>% predict(mtcars[-(1:4), ], penalty = 0:1) | ||
Error <rlang_error> | ||
`penalty` should be a single numeric value. `multi_predict()` can be used to get multiple predictions per row of data. | ||
|
||
--- | ||
# model errors on missing penalty value | ||
|
||
Code | ||
poisson_reg() %>% set_engine("glmnet") %>% fit(mpg ~ ., data = mtcars[-(1:4), ]) | ||
Error <rlang_error> | ||
For the glmnet engine, `penalty` must be a single number (or a value of `tune()`). | ||
Condition | ||
Error in `.check_glmnet_penalty_fit()`: | ||
! For the glmnet engine, `penalty` must be a single number (or a value of `tune()`). | ||
* There are 0 values for `penalty`. | ||
* To try multiple values for total regularization, use the tune package. | ||
* To predict multiple penalties, use `multi_predict()` | ||
|
||
# predict() errors with multiple penalty values | ||
|
||
Code | ||
poisson_reg(penalty = 0.1) %>% set_engine("glmnet") %>% fit(mpg ~ ., data = mtcars[ | ||
-(1:4), ]) %>% predict(mtcars[-(1:4), ], penalty = 0:1) | ||
Condition | ||
Error in `.check_glmnet_penalty_predict()`: | ||
! `penalty` should be a single numeric value. `multi_predict()` can be used to get multiple predictions per row of data. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# error without model formula (workflow, no tune) | ||
|
||
Code | ||
gam_fit <- gam_wflow %>% fit(mtcars) | ||
Condition | ||
Error: | ||
! When working with generalized additive models, please supply the model specification to `workflows::add_model()` along with a `formula` argument. | ||
i See `?parsnip::model_formula()` to learn more. | ||
|
||
# error without model formula (workflow, with tune) | ||
|
||
Code | ||
show_notes(gam_res) | ||
Output | ||
unique notes: | ||
-------------------------------------------------------------------------------- | ||
Error: | ||
! When working with generalized additive models, please supply the model specification to `workflows::add_model()` along with a `formula` argument. | ||
i See `?parsnip::model_formula()` to learn more. | ||
|
||
# error without model formula (no workflow, with tune) | ||
|
||
Code | ||
show_notes(gam_res) | ||
Output | ||
unique notes: | ||
-------------------------------------------------------------------------------- | ||
Error: | ||
! When working with generalized additive models, please supply the model specification to `workflows::add_model()` along with a `formula` argument. | ||
i See `?parsnip::model_formula()` to learn more. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.