r descr_models("logistic_reg", "glmnet")
defaults <- tibble::tibble(parsnip = c("penalty", "mixture"), default = c("see below", "1.0")) param <- logistic_reg() %>% set_engine("glmnet") %>% make_parameter_list(defaults)
This model has r nrow(param)
tuning parameters:
param$item
The penalty
parameter has no default and requires a single numeric value. For more details about this, and the glmnet
model in general, see [glmnet-details]. As for mixture
:
mixture = 1
specifies a pure lasso model,mixture = 0
specifies a ridge regression model, and0 < mixture < 1
specifies an elastic net model, interpolating lasso and ridge.logistic_reg(penalty = double(1), mixture = double(1)) %>% set_engine("glmnet") %>% translate()
By default, [glmnet::glmnet()] uses the argument standardize = TRUE
to center and scale the data.
The "Fitting and Predicting with parsnip" article contains examples for logistic_reg()
with the "glmnet"
engine.
Hastie, T, R Tibshirani, and M Wainwright. 2015. Statistical Learning with Sparsity. CRC Press.
Kuhn, M, and K Johnson. 2013. Applied Predictive Modeling. Springer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.