File: makeLearners.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 (65 lines) | stat: -rw-r--r-- 2,074 bytes parent folder | download
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeLearners.R
\name{makeLearners}
\alias{makeLearners}
\title{Create multiple learners at once.}
\usage{
makeLearners(cls, ids = NULL, type = NULL, ...)
}
\arguments{
\item{cls}{(\link{character})\cr
Classes of learners.}

\item{ids}{(\link{character})\cr
Id strings. Must be unique.
Default is \code{cls}.}

\item{type}{(\code{character(1)})\cr
Shortcut to prepend type string to \code{cls} so one can set \code{cls = "rpart"}.
Default is \code{NULL}, i.e., this is not used.}

\item{...}{(any)\cr 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 using
\verb{getParamSet(<learner>)}. Alternatively hyperparameters can be given using
the \code{par.vals} argument but \code{...} should be preferred!}
}
\value{
(named list of \link{Learner}). Named by \code{ids}.
}
\description{
Small helper function that can save some typing when creating mutiple learner objects.
Calls \link{makeLearner} multiple times internally.
}
\examples{
\dontshow{ if (requireNamespace("MASS")) \{ }
\dontshow{ if (requireNamespace("rpart")) \{ }
makeLearners(c("rpart", "lda"), type = "classif", predict.type = "prob")
\dontshow{ \} }
\dontshow{ \} }
}
\seealso{
Other learner: 
\code{\link{LearnerProperties}},
\code{\link{getClassWeightParam}()},
\code{\link{getHyperPars}()},
\code{\link{getLearnerId}()},
\code{\link{getLearnerNote}()},
\code{\link{getLearnerPackages}()},
\code{\link{getLearnerParVals}()},
\code{\link{getLearnerParamSet}()},
\code{\link{getLearnerPredictType}()},
\code{\link{getLearnerShortName}()},
\code{\link{getLearnerType}()},
\code{\link{getParamSet}()},
\code{\link{helpLearner}()},
\code{\link{helpLearnerParam}()},
\code{\link{makeLearner}()},
\code{\link{removeHyperPars}()},
\code{\link{setHyperPars}()},
\code{\link{setId}()},
\code{\link{setLearnerId}()},
\code{\link{setPredictThreshold}()},
\code{\link{setPredictType}()}
}
\concept{learner}