File: listLearners.Rd

package info (click to toggle)
r-cran-mlr 2.19.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,264 kB
  • sloc: ansic: 65; sh: 13; makefile: 5
file content (104 lines) | stat: -rw-r--r-- 3,487 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/listLearners.R
\name{listLearners}
\alias{listLearners}
\alias{listLearners.default}
\alias{listLearners.character}
\alias{listLearners.Task}
\title{Find matching learning algorithms.}
\usage{
listLearners(
  obj = NA_character_,
  properties = character(0L),
  quiet = TRUE,
  warn.missing.packages = TRUE,
  check.packages = FALSE,
  create = FALSE
)

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

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

\method{listLearners}{Task}(
  obj = NA_character_,
  properties = character(0L),
  quiet = TRUE,
  warn.missing.packages = TRUE,
  check.packages = TRUE,
  create = FALSE
)
}
\arguments{
\item{obj}{(\code{character(1)} | \link{Task})\cr
Either \code{character(1)} task or the type of the task, in the latter case one of:
\dQuote{classif} \dQuote{regr} \dQuote{surv} \dQuote{costsens} \dQuote{cluster} \dQuote{multilabel}.
Default is \code{NA} matching all types.}

\item{properties}{(\link{character})\cr
Set of required properties to filter for. Default is \code{character(0)}.}

\item{quiet}{(\code{logical(1)})\cr
Construct learners quietly to check their properties, shows no package startup messages.
Turn off if you suspect errors.
Default is \code{TRUE}.}

\item{warn.missing.packages}{(\code{logical(1)})\cr
If some learner cannot be constructed because its package is missing,
should a warning be shown?
Default is \code{TRUE}.}

\item{check.packages}{(\code{logical(1)})\cr
Check if required packages are installed. Calls \code{find.package()}.
If \code{create} is \code{TRUE}, this is done implicitly and the value of this parameter is ignored.
If \code{create} is \code{FALSE} and \code{check.packages} is \code{TRUE} the returned table only
contains learners whose dependencies are installed.
If \code{check.packages} set to \code{FALSE}, learners that cannot actually be constructed because
of missing packages may be returned.
Default is \code{FALSE}.}

\item{create}{(\code{logical(1)})\cr
Instantiate objects (or return info table)?
Packages are loaded if and only if this option is \code{TRUE}.
Default is \code{FALSE}.}
}
\value{
([data.frame\code{|}list` of \link{Learner}).
Either a descriptive data.frame that allows access to all properties of the learners
or a list of created learner objects (named by ids of listed learners).
}
\description{
Returns learning algorithms which have specific characteristics, e.g.
whether they support 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
\dQuote{wrapper} approaches like \link{CostSensWeightedPairsWrapper},
which are not listed, as they are not basic R learning algorithms.
The same applies for many multilabel methods, see, e.g., \link{makeMultilabelBinaryRelevanceWrapper}.
}
\examples{
\dontrun{
listLearners("classif", properties = c("multiclass", "prob"))
data = iris
task = makeClassifTask(data = data, target = "Species")
listLearners(task)
}
}