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
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trainLearner.R
\name{trainLearner}
\alias{trainLearner}
\title{Train an R learner.}
\usage{
trainLearner(.learner, .task, .subset, .weights = NULL, ...)
}
\arguments{
\item{.learner}{(\link{RLearner})\cr
Wrapped learner.}
\item{.task}{(\link{Task})\cr
Task to train learner on.}
\item{.subset}{(\link{integer})\cr
Subset of cases for training set, index the task with this.
You probably want to use \link{getTaskData} for this purpose.}
\item{.weights}{(\link{numeric})\cr
Weights for each observation.}
\item{...}{(any)\cr
Additional (hyper)parameters, which need to be passed to the underlying train function.}
}
\value{
(any). Model of the underlying learner.
}
\description{
Mainly for internal use. Trains a wrapped learner on a given training set.
You have to implement this method if you want to add another learner to this package.
}
\details{
Your implementation must adhere to the following:
The model must be fitted on the subset of \code{.task} given by \code{.subset}. All parameters
in \code{...} must be passed to the underlying training function.
}
|