Wrapper around PipeOpSubsample and PipeOpSurvAvg to simplify Graph creation.
Usage
pipeline_survbagging(
learner,
iterations = 10,
frac = 0.7,
avg = TRUE,
weights = 1,
graph_learner = FALSE
)
Arguments
- learner
[mlr3::Learner]|[mlr3pipelines::PipeOp]|[mlr3pipelines::Graph]
Either aLearner
which will be wrapped in mlr3pipelines::PipeOpLearner, aPipeOp
which will be wrapped in mlr3pipelines::Graph or aGraph
itself. UnderlyingLearner
should be LearnerSurv.- iterations
(
integer(1)
)
Number of bagging iterations. Defaults to 10.- frac
(
numeric(1)
)
Percentage of rows to keep during subsampling. See PipeOpSubsample for more information. Defaults to 0.7.- avg
(
logical(1)
)
IfTRUE
(default) predictions are aggregated with PipeOpSurvAvg, otherwise returned as multiple predictions. Can only beFALSE
ifgraph_learner = FALSE
.- weights
(
numeric()
)
Weights for model avering, ignored ifavg = FALSE
. Default is uniform weighting, see PipeOpSurvAvg.- graph_learner
(
logical(1)
)
IfTRUE
returns wraps the Graph as a GraphLearner otherwise (default) returns as aGraph
.
Details
Bagging (Bootstrap AGGregatING) is the process of bootstrapping data and aggregating
the final predictions. Bootstrapping splits the data into B
smaller datasets of a given size
and is performed with PipeOpSubsample. Aggregation is
the sample mean of deterministic predictions and a
MixtureDistribution of distribution predictions. This can be
further enhanced by using a weighted average by supplying weights
.
Dictionary
This Graph can be instantiated via the dictionary mlr_graphs or with the associated sugar function ppl():