trainLearner: Train an R learner.

Description Usage Arguments Details Value

View source: R/trainLearner.R

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.

Usage

1
trainLearner(.learner, .task, .subset, .weights = NULL, ...)

Arguments

.learner

[RLearner]
Wrapped learner.

.task

[Task]
Task to train learner on.

.subset

[integer]
Subset of cases for training set, index the task with this. You probably want to use getTaskData for this purpose.

.weights

[numeric]
Weights for each observation.

...

[any]
Additional (hyper)parameters, which need to be passed to the underlying train function.

Details

Your implementation must adhere to the following: The model must be fitted on the subset of .task given by .subset. All parameters in ... must be passed to the underlying training function.

Value

[any]. Model of the underlying learner.


guillermozbta/s2 documentation built on Jan. 2, 2018, 12:25 a.m.