Revision 272ac623c984dbf5defce76b6495c05accafe79f authored by Patrick Schratz on 17 December 2019, 04:08:28 UTC, committed by Patrick Schratz on 17 December 2019, 04:08:28 UTC
Build URL: https://circleci.com/gh/mlr-org/mlr/1264 Commit:
1 parent 9de9c6e
trainLearner.Rd
% 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.
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...