-
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.
testing updates after inactivity (#121)
* update snapshots for new error format * fix argument name * update snapshots * add dev lme4 based on lme4/lme4#758 * snapshot update * lme4 skips * rf snapshot update * update snaps for `test-recipes-nnmf_sparse.R` * update snaps for `test-sparse-glmnet.R` * update snap for `test-survival-tune-sa.R` * account for diff between CRAN and dev version by skipping the snapshot test on multiple penalty values on the (current) CRAN - will run again in the CRAN GHA once poissonreg is released * styling of argument in warning changed * update snap for `test-survival-augment.R` * more matrix related skips * use current, not future, version for `Matrix` * first check for `Matrix` version, then `lme4` version * use CRAN version of `lme4` which got released a few days ago * fix version number --------- Co-authored-by: Hannah Frick <[email protected]>
- Loading branch information
Showing
19 changed files
with
204 additions
and
83 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
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
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
Oops, something went wrong.