Note that the packages of all learners are loaded during the search if you create them. This can be a lot. If you do not create them we only inspect properties of the S3 classes. This will be a lot faster.
Note that for general cost-sensitive learning, mlr currently supports mainly
wrapper approaches like CostSensWeightedPairsWrapper
,
which are not listed, as they are not basic R learning algorithms.
The same applies for multilabel classification, see makeMultilabelBinaryRelevanceWrapper
.
listLearners(obj = NA_character_, properties = character(0L), quiet = TRUE, warn.missing.packages = TRUE, check.packages = TRUE, create = FALSE)
"listLearners"(obj, properties = character(0L), quiet = TRUE, warn.missing.packages = TRUE, check.packages = TRUE, create = FALSE)
"listLearners"(obj, properties = character(0L), quiet = TRUE, warn.missing.packages = TRUE, check.packages = TRUE, create = FALSE)
"listLearners"(obj, properties = character(0L), quiet = TRUE, warn.missing.packages = TRUE, check.packages = TRUE, create = FALSE)
character(1)
| Task
]
Either a task or the type of the task, in the latter case one of:
classif, regr, surv, costsens, cluster, multilabel.
Default is NA
, matching all types.character
]
Set of required properties to filter for. Default is character(0)
.logical(1)
]
Construct learners quietly to check their properties, shows no package startup messages.
Turn off if you suspect errors.
Default is TRUE
.logical(1)
]
If some learner cannot be constructed because its package is missing,
should a warning be shown?
Default is TRUE
.logical(1)
]
Check if required packages are installed. Calls
find.package()
. If create
is TRUE
,
this is done implicitly and the value of this parameter is ignored.
Default is TRUE
. If set to FALSE
, learners that cannot
actually be constructed because of missing packages may be returned.logical(1)
]
Instantiate objects (or return info table)?
Packages are loaded if and only if this option is TRUE
.
Default is FALSE
.data.frame
| list
of Learner
].
Either descriptive data.frame that allows access to all properties of learners or a list of created learner objects.
The latter is named by ids of listed learners.
## Not run:
# listLearners("classif", properties = c("multiclass", "prob"))
# data = iris
# task = makeClassifTask(data = data, target = "Species")
# listLearners(task)
# ## End(Not run)
Run the code above in your browser using DataLab