Skip to content

Commit

Permalink
restore tidy.glmnet(penalty) default
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Sep 10, 2024
1 parent b180de8 commit 9e187ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/tidy_glmnet.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ get_glmn_coefs <- function(x, penalty = 0.01) {
tidy_glmnet <- function(x, penalty = NULL, ..., call = caller_env()) {
check_installs(x$spec)
load_libs(x$spec, quiet = TRUE, attach = TRUE)
if (is.null(penalty)) {
penalty <- x$spec$args$penalty
}
check_number_decimal(penalty, min = 0, max = 1, allow_null = TRUE, call = call)
get_glmn_coefs(x$fit, penalty = penalty)
}

0 comments on commit 9e187ff

Please sign in to comment.