Learn R Programming

mlr3learners (version 0.5.6)

mlr_learners_classif.lda: Linear Discriminant Analysis Classification Learner

Description

Linear discriminant analysis. Calls MASS::lda() from package MASS.

Arguments

Dictionary

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

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

Meta Information

  • Task type: “classif”

  • Predict Types: “response”, “prob”

  • Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered”

  • Required Packages: mlr3, mlr3learners, MASS

Parameters

IdTypeDefaultLevelsRange
dimenuntyped--
methodcharactermomentmoment, mle, mve, t-
nuinteger-\((-\infty, \infty)\)
predict.methodcharacterplug-inplug-in, predictive, debiased-
predict.prioruntyped--
prioruntyped--
tolnumeric-\((-\infty, \infty)\)

Super classes

mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage

LearnerClassifLDA$new()


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClassifLDA$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Parameters method and prior exist for training and prediction but accept different values for each. Therefore, arguments for the predict stage have been renamed to predict.method and predict.prior, respectively.

References

Venables WN, Ripley BD (2002). Modern Applied Statistics with S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.

See Also

Other Learner: mlr_learners_classif.cv_glmnet, mlr_learners_classif.glmnet, mlr_learners_classif.kknn, mlr_learners_classif.log_reg, mlr_learners_classif.multinom, mlr_learners_classif.naive_bayes, mlr_learners_classif.nnet, mlr_learners_classif.qda, mlr_learners_classif.ranger, mlr_learners_classif.svm, mlr_learners_classif.xgboost, mlr_learners_regr.cv_glmnet, mlr_learners_regr.glmnet, mlr_learners_regr.kknn, mlr_learners_regr.km, mlr_learners_regr.lm, mlr_learners_regr.nnet, mlr_learners_regr.ranger, mlr_learners_regr.svm, mlr_learners_regr.xgboost

Examples

Run this code
if (requireNamespace("MASS", quietly = TRUE)) {
  learner = mlr3::lrn("classif.lda")
  print(learner)

  # available parameters:
learner$param_set$ids()
}

Run the code above in your browser using DataLab