% 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.
}
