From 60457e0c7590140a4bdca85d62d713c704537e00 Mon Sep 17 00:00:00 2001 From: Hannah Frick Date: Sun, 22 Jan 2023 13:12:47 +0000 Subject: [PATCH] add penalty check: require users to set a value --- R/poisson_reg.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/poisson_reg.R b/R/poisson_reg.R index ea954ae40..8300b491c 100644 --- a/R/poisson_reg.R +++ b/R/poisson_reg.R @@ -86,6 +86,7 @@ translate.poisson_reg <- function(x, engine = x$engine, ...) { x <- translate.default(x, engine, ...) if (engine == "glmnet") { + .check_glmnet_penalty_fit(x) # See discussion in https://github.com/tidymodels/parsnip/issues/195 x$method$fit$args$lambda <- NULL # Since the `fit` information is gone for the penalty, we need to have an