Wrap a Learner into a PipeOpSource:
$param_set (and therefore
$param_set$values) from the
Learner it is constructed from.
PipeOpLearner, it is possible to embed
Graphs, which themselves can be
turned into Learners using
GraphLearner. This way, preprocessing and ensemble methods can be included
into a machine learning pipeline which then can be handled as singular object for resampling, benchmarking
R6Class object inheriting from
Learnerto wrap, or a string identifying a
Dictionary. This argument is always cloned; to access the
character(1)Identifier of the resulting object, internally defaulting to the
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default
PipeOpLearner has one output channel named
NULL during training and a
during prediction; this subclass is specific to the
Learner type given to
learner during construction.
$state is set to the
$state slot of the
Learner object. It is a named
list with members:
Model created by the
Errors logged during training.
Training time, in seconds.
Errors logged during prediction.
numeric(1)Prediction time, in seconds.
The parameters are exactly the parameters of the
Learner wrapped by this object.
$state is currently not updated by prediction, so the
$state$predict_time will always be
Fields inherited from
PipeOp, as well as:
Methods inherited from
Other Meta PipeOps:
library("mlr3") task = tsk("iris") learner = lrn("classif.rpart", cp = 0.1) lrn_po = mlr_pipeops$get("learner", learner) lrn_po$train(list(task)) #> $output #> NULL #> lrn_po$predict(list(task)) #> $output #> <PredictionClassif> for 150 observations: #> row_ids truth response #> 1 setosa setosa #> 2 setosa setosa #> 3 setosa setosa #> --- #> 148 virginica virginica #> 149 virginica virginica #> 150 virginica virginica #>