diff --git a/inst/WORDLIST b/inst/WORDLIST index 5addb065..08d2c8c1 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,4 +1,8 @@ -Lifecycle -tidymodels -cron GH +GHA +PRs +cron +dev +repo +repos +tidymodels diff --git a/tests/testthat/_snaps/glmnet-linear.md b/tests/testthat/_snaps/glmnet-linear.md index 950ada48..0b86edc9 100644 --- a/tests/testthat/_snaps/glmnet-linear.md +++ b/tests/testthat/_snaps/glmnet-linear.md @@ -4,7 +4,7 @@ linear_reg(penalty = 0.01) %>% set_engine("glmnet") %>% fit(mpg ~ ., data = mtcars[ -(1:4), ]) %>% predict(mtcars[-(1:4), ], penalty = 0:1) Condition - Error in `.check_glmnet_penalty_predict()`: + Error in `predict()`: ! `penalty` should be a single numeric value. i `multi_predict()` can be used to get multiple predictions per row of data. @@ -13,7 +13,7 @@ Code linear_reg() %>% set_engine("glmnet") %>% fit(mpg ~ ., data = mtcars[-(1:4), ]) Condition - Error in `.check_glmnet_penalty_fit()`: + Error in `translate()`: x For the glmnet engine, `penalty` must be a single number (or a value of `tune()`). ! There are 0 values for `penalty`. i To try multiple values for total regularization, use the tune package. diff --git a/tests/testthat/_snaps/glmnet-logistic.md b/tests/testthat/_snaps/glmnet-logistic.md index a9408d92..c2ab93c0 100644 --- a/tests/testthat/_snaps/glmnet-logistic.md +++ b/tests/testthat/_snaps/glmnet-logistic.md @@ -13,7 +13,7 @@ funded_amnt) + int_rate + term, data = lending_club) %>% predict(lending_club, penalty = 0:1) Condition - Error in `.check_glmnet_penalty_predict()`: + Error in `predict()`: ! `penalty` should be a single numeric value. i `multi_predict()` can be used to get multiple predictions per row of data. @@ -23,7 +23,7 @@ logistic_reg() %>% set_engine("glmnet") %>% fit(Class ~ log(funded_amnt) + int_rate + term, data = lending_club) Condition - Error in `.check_glmnet_penalty_fit()`: + Error in `translate()`: x For the glmnet engine, `penalty` must be a single number (or a value of `tune()`). ! There are 0 values for `penalty`. i To try multiple values for total regularization, use the tune package. diff --git a/tests/testthat/_snaps/glmnet-multinom.md b/tests/testthat/_snaps/glmnet-multinom.md index bb06bfcc..b31e333e 100644 --- a/tests/testthat/_snaps/glmnet-multinom.md +++ b/tests/testthat/_snaps/glmnet-multinom.md @@ -12,7 +12,7 @@ multinom_reg(penalty = 0.01) %>% set_engine("glmnet") %>% fit(class ~ ., data = hpc_data) %>% predict(hpc_data, penalty = 0:1) Condition - Error in `.check_glmnet_penalty_predict()`: + Error in `predict()`: ! `penalty` should be a single numeric value. i `multi_predict()` can be used to get multiple predictions per row of data. @@ -21,7 +21,7 @@ Code multinom_reg() %>% set_engine("glmnet") %>% fit(class ~ ., data = hpc_data) Condition - Error in `.check_glmnet_penalty_fit()`: + Error in `translate()`: x For the glmnet engine, `penalty` must be a single number (or a value of `tune()`). ! There are 0 values for `penalty`. i To try multiple values for total regularization, use the tune package. diff --git a/tests/testthat/_snaps/glmnet-poisson.md b/tests/testthat/_snaps/glmnet-poisson.md index b73cffab..0ab32750 100644 --- a/tests/testthat/_snaps/glmnet-poisson.md +++ b/tests/testthat/_snaps/glmnet-poisson.md @@ -3,7 +3,7 @@ Code poisson_reg() %>% set_engine("glmnet") %>% fit(mpg ~ ., data = mtcars[-(1:4), ]) Condition - Error in `.check_glmnet_penalty_fit()`: + Error in `translate()`: x For the glmnet engine, `penalty` must be a single number (or a value of `tune()`). ! There are 0 values for `penalty`. i To try multiple values for total regularization, use the tune package. @@ -15,7 +15,7 @@ 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()`: + Error in `predict()`: ! `penalty` should be a single numeric value. i `multi_predict()` can be used to get multiple predictions per row of data. diff --git a/tests/testthat/test-glmnet-linear.R b/tests/testthat/test-glmnet-linear.R index d8e177c3..c77b56dd 100644 --- a/tests/testthat/test-glmnet-linear.R +++ b/tests/testthat/test-glmnet-linear.R @@ -265,7 +265,7 @@ test_that('multi_predict() with default or single penalty value', { test_that('error traps', { skip_if_not_installed("glmnet") - skip_if_not_installed("parsnip", minimum_version = "1.2.1.9002") + skip_if_not_installed("parsnip", minimum_version = "1.2.1.9003") expect_snapshot(error = TRUE, { linear_reg(penalty = 0.01) %>% diff --git a/tests/testthat/test-glmnet-logistic.R b/tests/testthat/test-glmnet-logistic.R index 52336b08..1ea51417 100644 --- a/tests/testthat/test-glmnet-logistic.R +++ b/tests/testthat/test-glmnet-logistic.R @@ -377,7 +377,7 @@ test_that("class predictions are factors with all levels", { test_that('error traps', { skip_if_not_installed("glmnet") - skip_if_not_installed("parsnip", minimum_version = "1.2.1.9002") + skip_if_not_installed("parsnip", minimum_version = "1.2.1.9003") data("lending_club", package = "modeldata", envir = rlang::current_env()) diff --git a/tests/testthat/test-glmnet-multinom.R b/tests/testthat/test-glmnet-multinom.R index 8b7f7197..4c61cf8e 100644 --- a/tests/testthat/test-glmnet-multinom.R +++ b/tests/testthat/test-glmnet-multinom.R @@ -399,7 +399,7 @@ test_that("class predictions are factors with all levels", { test_that('error traps', { skip_if_not_installed("glmnet") - skip_if_not_installed("parsnip", minimum_version = "1.2.1.9002") + skip_if_not_installed("parsnip", minimum_version = "1.2.1.9003") data("hpc_data", package = "modeldata", envir = rlang::current_env()) diff --git a/tests/testthat/test-glmnet-poisson.R b/tests/testthat/test-glmnet-poisson.R index 0164470c..cfd11447 100644 --- a/tests/testthat/test-glmnet-poisson.R +++ b/tests/testthat/test-glmnet-poisson.R @@ -2,7 +2,6 @@ library(poissonreg) test_that("glmnet model object", { skip_if_not_installed("glmnet") - data(seniors, package = "poissonreg", envir = rlang::current_env()) seniors_x <- model.matrix(~ ., data = seniors[, -4])[, -1] seniors_y <- seniors$count @@ -122,9 +121,9 @@ test_that("formula interface can deal with missing values", { }) test_that("model errors on missing penalty value", { + skip_if_not_installed("parsnip", minimum_version = "1.2.1.9003") skip_if_not_installed("glmnet") - skip_if_not_installed("parsnip", minimum_version = "1.2.1.9001") expect_snapshot(error = TRUE, { poisson_reg() %>% set_engine("glmnet") %>%