Small helper function that can save some typing when creating mutiple learner objects. Calls makeLearner multiple times internally.
Arguments
- cls
(character)
Classes of learners.- ids
(character)
Id strings. Must be unique. Default iscls.- type
(
character(1))
Shortcut to prepend type string toclsso one can setcls = "rpart". Default isNULL, i.e., this is not used.- ...
(any)
Optional named (hyper)parameters. If you want to set specific hyperparameters for a learner during model creation, these should go here. You can get a list of available hyperparameters usinggetParamSet(<learner>). Alternatively hyperparameters can be given using thepar.valsargument but...should be preferred!
Value
(named list of Learner). Named by ids.
See also
Other learner:
LearnerProperties,
getClassWeightParam(),
getHyperPars(),
getLearnerId(),
getLearnerNote(),
getLearnerPackages(),
getLearnerParVals(),
getLearnerParamSet(),
getLearnerPredictType(),
getLearnerShortName(),
getLearnerType(),
getParamSet(),
helpLearnerParam(),
helpLearner(),
makeLearner(),
removeHyperPars(),
setHyperPars(),
setId(),
setLearnerId(),
setPredictThreshold(),
setPredictType()
Examples
makeLearners(c("rpart", "lda"), type = "classif", predict.type = "prob")
#> $classif.rpart
#> Learner classif.rpart from package rpart
#> Type: classif
#> Name: Decision Tree; Short name: rpart
#> Class: classif.rpart
#> Properties: twoclass,multiclass,missings,numerics,factors,ordered,prob,weights,featimp
#> Predict-Type: prob
#> Hyperparameters: xval=0
#>
#>
#> $classif.lda
#> Learner classif.lda from package MASS
#> Type: classif
#> Name: Linear Discriminant Analysis; Short name: lda
#> Class: classif.lda
#> Properties: twoclass,multiclass,numerics,factors,prob
#> Predict-Type: prob
#> Hyperparameters:
#>
#>
