Graph as determined by the
Input is routed through the
content and the
contents' output is returned.
content hyperparameter can be changed during tuning, this is useful as an alternative to
R6Class inheriting from
PipeOpProxy$new(innum = 0, outnum = 1, id = "proxy", param_vals = list())
numeric(1)\cr Determines the number of input channels. If innum` is 0 (default), a vararg input channel is created that can take an arbitrary number of inputs.
outnum :: `numeric(1)
Determines the number of output channels.
param_vals :: named
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default
PipeOpProxy has multiple input channels depending on the
innum construction argument, named
"input2", ... if
innum is nonzero; if
innum is 0, there is only one vararg
input channel named
PipeOpProxy has multiple output channels depending on the
outnum construction argument,
The output is determined by the output of the
content operation (a
Graph that is being proxied (or an object that is
converted to a
as_graph()). Defaults to an instance of
PipeOpFeatureUnion (combines all input if they are
content will internally be coerced to a graph via
as_graph() prior to train and predict.
The default value for
Fields inherited from
Only methods inherited from
library("mlr3") library("mlr3learners") set.seed(1234) task = tsk("iris") # use a proxy for preprocessing and a proxy for learning, i.e., # no preprocessing and classif.kknn g = po("proxy", id = "preproc", param_vals = list(content = po("nop"))) %>>% po("proxy", id = "learner", param_vals = list(content = lrn("classif.kknn"))) rr_kknn = resample(task, learner = GraphLearner$new(g), resampling = rsmp("cv", folds = 3)) rr_kknn$aggregate(msr("classif.ce"))#> classif.ce #> 0.05333333# use pca for preprocessing and classif.rpart as the learner g$param_set$values$preproc.content = po("pca") g$param_set$values$learner.content = lrn("classif.rpart") rr_pca_rpart = resample(task, learner = GraphLearner$new(g), resampling = rsmp("cv", folds = 3)) rr_pca_rpart$aggregate(msr("classif.ce"))#> classif.ce #> 0.06