Generalized linear models with elastic net regularization. Calls glmnet::glmnet() from package glmnet.

Caution: This learner is different to _glmnet in that it does not use the internal optimization of lambda. The parameter needs to be tuned by the user. Essentially, one needs to tune parameter s which is used at predict-time.

See https://stackoverflow.com/questions/50995525/ for more information.

Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

mlr_learners$get("classif.glmnet")
lrn("classif.glmnet")

References

Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths for Generalized Linear Models via Coordinate Descent.” Journal of Statistical Software, 33(1), 1--22. doi: 10.18637/jss.v033.i01 .

See also

Super classes

mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage

LearnerClassifGlmnet$new()


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClassifGlmnet$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (requireNamespace("glmnet")) { learner = mlr3::lrn("classif.glmnet") print(learner) # available parameters: learner$param_set$ids() }
#> <LearnerClassifGlmnet:classif.glmnet> #> * Model: - #> * Parameters: list() #> * Packages: glmnet #> * Predict Type: response #> * Feature types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights
#> [1] "alpha" "type.measure" "s" "lambda.min.ratio" #> [5] "lambda" "standardize" "intercept" "thresh" #> [9] "dfmax" "pmax" "exclude" "penalty.factor" #> [13] "lower.limits" "upper.limits" "maxit" "type.logistic" #> [17] "type.multinomial" "keep" "parallel" "trace.it" #> [21] "alignment" "grouped" "offset" "relax" #> [25] "fdev" "devmax" "eps" "big" #> [29] "mnlam" "pmin" "exmx" "prec" #> [33] "mxit" "newoffset" "exact" "gamma"