% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LearnerParam.R, R/makeLearnerParamFuns.R
\name{LearnerParam}
\alias{LearnerParam}
\alias{makeNumericLearnerParam}
\alias{makeNumericVectorLearnerParam}
\alias{makeIntegerLearnerParam}
\alias{makeIntegerVectorLearnerParam}
\alias{makeDiscreteLearnerParam}
\alias{makeDiscreteVectorLearnerParam}
\alias{makeLogicalLearnerParam}
\alias{makeLogicalVectorLearnerParam}
\alias{makeUntypedLearnerParam}
\alias{makeFunctionLearnerParam}
\title{Create a description object for a parameter of a machine learning
algorithm.}
\usage{
makeNumericLearnerParam(
  id,
  lower = -Inf,
  upper = Inf,
  allow.inf = FALSE,
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)

makeNumericVectorLearnerParam(
  id,
  len = as.integer(NA),
  lower = -Inf,
  upper = Inf,
  allow.inf = FALSE,
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)

makeIntegerLearnerParam(
  id,
  lower = -Inf,
  upper = Inf,
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)

makeIntegerVectorLearnerParam(
  id,
  len = as.integer(NA),
  lower = -Inf,
  upper = Inf,
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)

makeDiscreteLearnerParam(
  id,
  values,
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)

makeDiscreteVectorLearnerParam(
  id,
  len = as.integer(NA),
  values,
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)

makeLogicalLearnerParam(
  id,
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)

makeLogicalVectorLearnerParam(
  id,
  len = as.integer(NA),
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)

makeUntypedLearnerParam(
  id,
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)

makeFunctionLearnerParam(
  id,
  default,
  when = "train",
  requires = NULL,
  tunable = TRUE,
  special.vals = list()
)
}
\arguments{
\item{id}{(\code{character(1)})\cr
Name of parameter.}

\item{lower}{(\code{numeric} | \code{expression})\cr
Lower bounds. A singe value of
length 1 is automatically replicated to \code{len} for vector parameters. If
\code{len = NA} you can only pass length-1 scalars. Default is \code{-Inf}.}

\item{upper}{(\code{numeric} | \code{expression})\cr
Upper bounds. A singe value of
length 1 is automatically replicated to \code{len} for vector parameters. If
\code{len = NA} you can only pass length-1 scalars. Default is \code{Inf}.}

\item{allow.inf}{(\code{logical(1)})\cr
Allow infinite values for numeric and
numericvector params to be feasible settings. Default is \code{FALSE}.}

\item{default}{(any concrete value | \code{expression})\cr
Default value used in
learner. Note: When this is a discrete parameter make sure to use a VALUE
here, not the NAME of the value. If this argument is missing, it means no
default value is available.}

\item{when}{(\code{character(1)})\cr
Specifies when parameter is used in the learner: \dQuote{train},
\dQuote{predict} or \dQuote{both}. Default is \dQuote{train}.}

\item{requires}{(\code{NULL} | \code{call} | \code{expression})\cr
States requirements on
other parameters' values, so that setting this parameter only makes sense
if its requirements are satisfied (dependent parameter). Can be an object
created either with \code{expression} or \code{quote}, the former type is
auto-converted into the later. Only really useful if the parameter is
included in a (ParamSet()). Default is \code{NULL} which means no requirements.}

\item{tunable}{(\code{logical(1)})\cr
Is this parameter tunable? Defining a
parameter to be not-tunable allows to mark arguments like, e.g.,
\dQuote{verbose} or other purely technical stuff. Note that this flag is
most likely not respected by optimizing procedures unless stated otherwise.
Default is \code{TRUE} (except for \code{untyped}, \code{function}, \code{character} and
\code{characterVector}) which means it is tunable.}

\item{special.vals}{(\code{list()})\cr
A list of special values the parameter can
except which are outside of the defined range. Default is an empty list.}

\item{len}{(\code{integer(1)})\cr
Length of vector parameter.
Can be set to \code{NA} to define a vector with unspecified length.}

\item{values}{(\code{vector} | \code{list} | \code{expression})\cr
Possible discrete values.
Instead of using a vector of atomic values, you are also allowed to pass a
list of quite \dQuote{complex} R objects, which are used as discrete
choices. If you do the latter, the elements must be uniquely named, so that
the names can be used as internal representations for the choice.}
}
\value{
\code{\link[=LearnerParam]{LearnerParam()}}.
}
\description{
This specializes \code{\link[=Param]{Param()}} by adding a few more attributes, like
a default value, whether it refers to a training or a predict function, etc.
Note that you can set \code{length} to \code{NA}

The S3 class is a \code{\link[=Param]{Param()}} which additionally stores these elements:
\describe{
\item{when \code{character(1)}}{See argument of same name.}
}

See the note in \code{\link[=Param]{Param()}} about being able to pass expressions to certain arguments.
}
