Learn R Programming

mlr (version 2.7)

listLearners: Find matching learning algorithms.

Description

Returns the class names of learning algorithms which have specific characteristics, e.g. whether they supports missing values, case weights, etc.

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.

Usage

listLearners(obj = NA_character_, properties = character(0L),
  quiet = TRUE, warn.missing.packages = TRUE, check.packages = TRUE,
  create = FALSE)

## S3 method for class 'default': listLearners(obj, properties = character(0L), quiet = TRUE, warn.missing.packages = TRUE, check.packages = TRUE, create = FALSE)

## S3 method for class 'character': listLearners(obj, properties = character(0L), quiet = TRUE, warn.missing.packages = TRUE, check.packages = TRUE, create = FALSE)

## S3 method for class 'Task': listLearners(obj, properties = character(0L), quiet = TRUE, warn.missing.packages = TRUE, check.packages = TRUE, create = FALSE)

Arguments

Value

[character | list of Learner]. The latter is named by ids of listed learners.

Examples

Run this code
listLearners("classif", properties = c("multiclass", "prob"))
data = iris
task = makeClassifTask(data = data, target = "Species")
listLearners(task)

Run the code above in your browser using DataLab