Calls stats::glm from package stats.

Details

For logistic regression please use mlr_learners_classif.log_reg.

Dictionary

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

mlr_learners$get("regr.glm")
lrn("regr.glm")

Traits

  • Packages: stats

  • Predict Types: response, se

  • Feature Types: logical, integer, numeric, character, factor, ordered

  • Properties: weights

Custom mlr3 defaults

  • type

    • Actual default: "link"

    • Adjusted default: "response"

    • Reason for change: Response scale more natural for predictions.

See also

Author

salauer

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlm

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage

LearnerRegrGlm$new()


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrGlm$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# stop example failing with warning if package not installed learner = suppressWarnings(mlr3::lrn("regr.glm")) print(learner)
#> <LearnerRegrGlm:regr.glm> #> * Model: - #> * Parameters: family=gaussian, type=response #> * Packages: stats #> * Predict Type: response #> * Feature types: logical, integer, numeric, character, factor, ordered #> * Properties: weights
# available parameters: learner$param_set$ids()
#> [1] "singular.ok" "x" "y" "model" "etastart" #> [6] "mustart" "start" "offset" "family" "na.action" #> [11] "link" "epsilon" "maxit" "trace" "dispersion" #> [16] "type"