Task gets features depending on the capsuled
$predict_type. If the
"response", a feature
<ID>.response is created,
<ID>.prob.<CLASS> features are created, and for
"se" the new columns
<ID> denotes the
$id of the
$param_set (and therefore
$param_set$values) from the
Learner it is constructed from.
PipeOpLearnerCV can be used to create "stacking" or "super learning"
Graphs that use the output of one
as feature for another
Learner. Because the
PipeOpLearnerCV erases the original input features, it is often
useful to use
PipeOpFeatureUnion to bind the prediction
Task to the original input
PipeOpLearnerCV$new(learner, id = NULL, param_vals = list())
param_vals :: named
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default
The output is a task with the same target as the input task, with features replaced by predictions made by the
During training, this prediction is the out-of-sample prediction made by
resample, during prediction, this is the
ordinary prediction made on the data by a
Learner trained on the training phase data.
Model created by the
data.table with columns
Errors logged during training.
Training time, in seconds.
data.table with columns
Errors logged during prediction.
Prediction time, in seconds.
Which resampling method do we want to use. Currently only supports
predictions with the model trained on all training data.
Number of cross validation folds. Initialized to 3. Only used for
resampling.method = "cv".
Only effective during
"prob" prediction: Whether to keep response values, if available. Initialized to
$state is currently not updated by prediction, so the
$state$predict_time will always be
Fields inherited from
PipeOp, as well as:
Other Meta PipeOps:
library("mlr3") task = tsk("iris") learner = lrn("classif.rpart") lrncv_po = po("learner_cv", learner) lrncv_po$learner$predict_type = "response" nop = mlr_pipeops$get("nop") graph = gunion(list( lrncv_po, nop )) %>>% po("featureunion") graph$train(task)#> $featureunion.output #> <TaskClassif:iris> (150 x 6) #> * Target: Species #> * Properties: multiclass #> * Features (5): #> - dbl (4): Petal.Length, Petal.Width, Sepal.Length, Sepal.Width #> - fct (1): classif.rpart.response #>graph$pipeops$classif.rpart$learner$predict_type = "prob" graph$train(task)#> $featureunion.output #> <TaskClassif:iris> (150 x 8) #> * Target: Species #> * Properties: multiclass #> * Features (7): #> - dbl (7): Petal.Length, Petal.Width, Sepal.Length, Sepal.Width, #> classif.rpart.prob.setosa, classif.rpart.prob.versicolor, #> classif.rpart.prob.virginica #>