po {mlr3pipelines} | R Documentation |
Shorthand PipeOp Constructor
Description
Create
a
PipeOp
frommlr_pipeops
from given IDa
PipeOpLearner
from aLearner
objecta
PipeOpFilter
from aFilter
objecta
PipeOpSelect
from aSelector
objecta clone of a
PipeOp
from a givenPipeOp
(possibly with changed settings)
The object is initialized with given parameters and param_vals
.
po()
taks a single obj
(PipeOp
id, Learner
, ...) and converts
it to a PipeOp
. pos()
(with plural-s) takes either a character
-vector, or a
list of objects, and creates a list
of PipeOp
s.
Usage
po(.obj, ...)
pos(.objs, ...)
Arguments
.obj |
|
... |
|
.objs |
|
Value
A PipeOp
(for po()
), or a list
of PipeOp
s (for pos()
).
Examples
library("mlr3")
po("learner", lrn("classif.rpart"), cp = 0.3)
po(lrn("classif.rpart"), cp = 0.3)
# is equivalent with:
mlr_pipeops$get("learner", lrn("classif.rpart"),
param_vals = list(cp = 0.3))
pos(c("pca", original = "nop"))