mlr3pipelines
mlr3pipelines copied to clipboard
`GraphLearner` should implement custom `$configure()` and `Graph` should also implement `$configure()`
mlr3's $configure() allows to set both hyperparameters and fields.
It would be nice if GraphLearner provided its own $configure() method that also allows to set fields of PipeOps, something like
graph = po("pca") %>>% lrn("classif.rpart")
glrn = as_learner(graph)
glrn$configure(
classif.rpart.predict_type = "prob"
)
Currently this does not work, because glrn does neither have a field nor parameter called classif.rpart.predict_type.
Analogously, it would be nice if the same was possible for Graphs, which currently don't have a $configure() method.