File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -96,29 +96,7 @@ print.multinom_reg <- function(x, ...) {
9696}
9797
9898# ' @export
99- translate.multinom_reg <- function (x , engine = x $ engine , ... ) {
100- x <- translate.default(x , engine , ... )
101-
102- if (engine == " glmnet" ) {
103- check_glmnet_penalty(x )
104- if (any(names(x $ eng_args ) == " path_values" )) {
105- # Since we decouple the parsnip `penalty` argument from being the same
106- # as the glmnet `lambda` value, `path_values` allows users to set the
107- # path differently from the default that glmnet uses. See
108- # https://github.com/tidymodels/parsnip/issues/431
109- x $ method $ fit $ args $ lambda <- x $ eng_args $ path_values
110- x $ eng_args $ path_values <- NULL
111- x $ method $ fit $ args $ path_values <- NULL
112- } else {
113- # See discussion in https://github.com/tidymodels/parsnip/issues/195
114- x $ method $ fit $ args $ lambda <- NULL
115- }
116- # Since the `fit` information is gone for the penalty, we need to have an
117- # evaluated value for the parameter.
118- x $ args $ penalty <- rlang :: eval_tidy(x $ args $ penalty )
119- }
120- x
121- }
99+ translate.multinom_reg <- translate.linear_reg
122100
123101# ------------------------------------------------------------------------------
124102
You can’t perform that action at this time.
0 commit comments