R/LearnerClassifLogReg.R
mlr_learners_classif.log_reg.RdClassification via logistic regression.
Calls stats::glm() with family set to "binomial".
Argument model is set to FALSE.
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():
mlr_learners$get("classif.log_reg") lrn("classif.log_reg")
To ensure reproducibility, this learner always uses the default contrasts:
contr.treatment() for unordered factors, and
contr.poly() for ordered factors.
Setting the option "contrasts" does not have any effect.
Instead, set the respective hyperparameter or use mlr3pipelines to create dummy features.
mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg
new()Creates a new instance of this R6 class.
LearnerClassifLogReg$new()
clone()The objects of this class are cloneable with this method.
LearnerClassifLogReg$clone(deep = FALSE)
deepWhether to make a deep clone.
if (requireNamespace("stats")) { learner = mlr3::lrn("classif.log_reg") print(learner) # available parameters: learner$param_set$ids() }#> <LearnerClassifLogReg:classif.log_reg> #> * Model: - #> * Parameters: list() #> * Packages: stats #> * Predict Type: response #> * Feature types: logical, integer, numeric, character, factor, ordered #> * Properties: twoclass, weights#> [1] "singular.ok" "x" "y" "model" "etastart" #> [6] "mustart" "start" "offset" "epsilon" "maxit" #> [11] "trace" "se.fit" "dispersion"