Skip to content

Commit 2249cbb

Browse files
authored
Merge pull request #860 from tidymodels/poisson_reg-glmnet-penalty
glmnet: Require users to set `penalty` value for `poisson_reg()`
2 parents 0b6b85f + 60457e0 commit 2249cbb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

R/poisson_reg.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ translate.poisson_reg <- function(x, engine = x$engine, ...) {
8686
x <- translate.default(x, engine, ...)
8787

8888
if (engine == "glmnet") {
89+
.check_glmnet_penalty_fit(x)
8990
# See discussion in https://github.com/tidymodels/parsnip/issues/195
9091
x$method$fit$args$lambda <- NULL
9192
# Since the `fit` information is gone for the penalty, we need to have an

0 commit comments

Comments
 (0)