learn.task-class(mlr)R Documentation

learn.task

Description

A learning task is the general description object for a machine learning experiment. It mainly includes the type of the learning task (e.g. lda), a dataframe and a formula. As this is just an abstract base class, you should not instantiate it directly but use the inheriting classes and their factory methods.

Slots

wrapped.learner:
(wrapped.learner) Object of class wrapped.learner.
data:
(data.frame) Dataframe which includes all the data for the task.
weights:
(numeric) An optional vector of weights to be used in the fitting process. Default is a weight of 1 for every case.
formula:
(formula) A symbolic description of the model to be fitted.
data.desc:
(data.desc) Contains logical values describing properties of the dataframe e.g. whether it has characters or missing values (see desc and data.desc).

Methods

benchmark
signature(learn.task = "learn.task", outer.resampling = "resample.instance", inner.resampling = "resample.desc", ranges = "list", measure = "list", all.tune.results = "logical"): benchmark conducts a benchmark experiment for a single classifier on a single data set. This consists of an inner stage and outer stage. At the outer stage a tuning set and a test set are repeatedly formed from the data through resampling (usually cross-validation or bootstrapping). The respective hyperparameters of the classifier are tuned on the tuning set again through an inner resampling process, the classifier is trained on the complete tuning set with the best found hyperparameters and the performance is measured on the test set.
predict
signature(object = "learn.task"): Predicts the target values of a new data set based on an already fitted wrapped.model of a learn.task.
resample.fit
signature(learn.task = "learn.task", resample.instance = "resample.instance", parset = "list", vars = "character", models = "logical", type = "character"): Given the training and test indices (e.g. generated by cross-validation and generally specified by the resample.instance object) resample.fit fits the selected learner using the training sets and performs predictions for the test sets. These predictions are returned - encapsulated in a resample.result object. Optionally the fitted models are also stored.
resample.performance
signature(learn.task = "learn.task", resample.instance = "resample.instance", resample.result = "resample.result", measure = "list"): Measures the quality of predictions w.r.t. some loss function for a resampled fit.
initialize
signature( = "learn.task"): Constructor.
[
signature( = "learn.task"): Getter.
set.train.par
signature( = "learn.task"): Set a parameter for the underlying train function of a [wrapped.learner] in a [learn.task]. This is not meant for hyperparameters, pass these through the usual parset argument, but rather to fix (somewhat technical) arguments which stay the same for the whole experiment. You should not have to use this too often.
set.predict.par
signature( = "learn.task"): Set a parameter for the underlying train function of a [wrapped.learner] in a [learn.task]. This is not meant for hyperparameters, pass these through the usual parset argument, but rather to fix (somewhat technical) arguments which stay the same for the whole experiment. You should not have to use this too often.

See Also

classif.task regr.task


[Package mlr version 0.3.180 Index]