Learn R Programming

mlr (version 2.3)

makeLearner: Create learner object.

Description

For a classification learner the predict.type can be set to prob to predict probabilities and the maximum value selects the label. The threshold used to assign the label can later be changed using the setThreshold function.

Usage

makeLearner(cl, id = cl, predict.type = "response",
  predict.threshold = NULL, fix.factors = FALSE, ..., par.vals = list(),
  config = list())

Arguments

Value

[Learner].

See Also

[resample], [predict.WrappedModel]

Other learner: LearnerProperties, addProperties, hasProperties, removeProperties, setProperties; getHyperPars; getParamSet; removeHyperPars; setHyperPars; setId; setPredictThreshold; setPredictType; showHyperPars

Examples

Run this code
makeLearner("classif.rpart")
makeLearner("classif.lda", predict.type = "prob")
lrn = makeLearner("classif.lda", method = "t", nu = 10)
print(lrn$par.vals)

Run the code above in your browser using DataLab