R: Create multiple learners at once.

makeLearners {mlr} | R Documentation

## Create multiple learners at once.

### Description

Small helper function that can save some typing when creating mutiple learner objects. Calls makeLearner multiple times internally.

### Usage

    makeLearners(cls, ids = NULL, type = NULL, ...)

### Arguments

`cls` | (character) Classes of learners.
`ids` | (character) Id strings. Must be unique. Default is `cls`.
`type` | (`character(1)`) Shortcut to prepend type string to `cls` so one can set `cls = "rpart"`. Default is `NULL`, i.e., this is not used.
`...` | (any) Optional named (hyper)parameters. Alternatively these can be given using the `par.vals` argument.

### Value

(named list of Learner). Named by `ids`.

### See Also

Other learner: `LearnerProperties`, `getClassWeightParam`, `getHyperPars`, `getLearnerId`, `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")

[Package mlr version 2.13 Index]