po
From mlr3pipelines v0.3.0
by Martin Binder
Shorthand PipeOp Constructor
Create
a
PipeOp
frommlr_pipeops
from given IDa
PipeOpLearner
from aLearner
objecta
PipeOpFilter
from aFilter
objecta
PipeOpSelect
from aSelector
object
The object is initialized with given parameters and param_vals
.
Usage
po(.obj, ...)
Arguments
- .obj
[any]
The object from which to construct aPipeOp
. If this is acharacter(1)
, it is looked up in themlr_pipeops
dictionary. Otherwise, it is converted to aPipeOp
.- ...
any
Additional parameters to give to constructed object. This may be an argument of the constructor of thePipeOp
, in which case it is given to this constructor; or it may be a parameter value, in which case it is given to theparam_vals
argument of the constructor.
Examples
# NOT RUN {
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))
# }
Community examples
Looks like there are no examples yet.