set_validate.GraphLearner {mlr3pipelines} | R Documentation |
Configure Validation for a GraphLearner
Description
Configure validation for a graph learner.
In a GraphLearner
, validation can be configured on two levels:
On the
GraphLearner
level, which specifies how the validation set is constructed before entering the graph.On the level of the individual
PipeOp
s (such asPipeOpLearner
), which specifies which pipeops actually make use of the validation data (set its$validate
field to"predefined"
) or not (set it toNULL
). This can be specified via the argumentids
.
Usage
## S3 method for class 'GraphLearner'
set_validate(
learner,
validate,
ids = NULL,
args_all = list(),
args = list(),
...
)
Arguments
learner |
( |
validate |
( |
ids |
( |
args_all |
( |
args |
(named |
... |
(any) |
Examples
library(mlr3)
glrn = as_learner(po("pca") %>>% lrn("classif.debug"))
set_validate(glrn, 0.3)
glrn$validate
glrn$graph$pipeops$classif.debug$learner$validate
set_validate(glrn, NULL)
glrn$validate
glrn$graph$pipeops$classif.debug$learner$validate
set_validate(glrn, 0.2, ids = "classif.debug")
glrn$validate
glrn$graph$pipeops$classif.debug$learner$validate