R/PipeOpLearnerPred.R, R/PipeOpMCBoost.R
mlr_pipeops_mcboost.Rdmlr3pipelines::PipeOp that trains a Learner and passes its predictions forward during training and prediction.
Post-process a learner prediction using multi-calibration.
For more details, please refer to https://arxiv.org/pdf/1805.12317.pdf (Kim et al. 2018)
or the help for MCBoost.
If no init_predictor is provided, the preceding learner's predictions
corresponding to the prediction slot are used as an initial predictor for MCBoost.
R6Class inheriting from mlr3pipelines::PipeOp.
R6Class inheriting from mlr3pipelines::PipeOp.
PipeOpLearnerPred$new(learner, id = NULL, param_vals = list())
* `learner` :: [`Learner`][mlr3::Learner] \cr
[`Learner`][mlr3::Learner] to prediction, or a string identifying a
[`Learner`][mlr3::Learner] in the [`mlr3::mlr_learners`] [`Dictionary`][mlr3misc::Dictionary].
* `id` :: `character(1)`
Identifier of the resulting object, internally defaulting to the `id` of the [`Learner`][mlr3::Learner] being wrapped.
* `param_vals` :: named `list`\cr
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default `list()`.
[mlr3::Learner]: R:mlr3::Learner
[mlr3::Learner]: R:mlr3::Learner
[mlr3::Learner]: R:mlr3::Learner
[`mlr3::mlr_learners`]: R:%60mlr3::mlr_learners%60
[mlr3misc::Dictionary]: R:mlr3misc::Dictionary
[mlr3::Learner]: R:mlr3::Learnerid :: character(1)
Identifier of the resulting object, default "threshold".
param_vals :: named list
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction.
See MCBoost for a comprehensive description of all hyperparameters.
PipeOpLearnerPred has one input channel named "input", taking a Task specific to the Learner
type given to learner during construction; both during training and prediction.
PipeOpLearnerPred has one output channel named "output", producing a Task specific to the Learner
type given to learner during construction; both during training and prediction.
During training, the input and output are "data" and "prediction", two TaskClassif.
A PredictionClassif is required as input and returned as output during prediction.
The $state is a MCBoost Object as obtained from MCBoost$new().
The $state is set to the $state slot of the Learner object, together with the $state elements inherited from
mlr3pipelines::PipeOpTaskPreproc. It is a named list with the inherited members, as well as:
model :: any
Model created by the Learner's $.train() function.
train_log :: data.table with columns class (character), msg (character)
Errors logged during training.
train_time :: numeric(1)
Training time, in seconds.
predict_log :: NULL | data.table with columns class (character), msg (character)
Errors logged during prediction.
predict_time :: NULL | numeric(1)
Prediction time, in seconds.
max_iter :: integer
A integer specifying the number of multi-calibration rounds. Defaults to 5.
Fields inherited from PipeOp, as well as:
learner_model :: LearnerLearner that is being wrapped. This learner contains the model if the PipeOp is trained. Read-only.
Only fields inherited from mlr3pipelines::PipeOp.
Methods inherited from mlr3pipelines::PipeOpTaskPreproc/mlr3pipelines::PipeOp.
Only methods inherited from mlr3pipelines::PipeOp.
https://mlr3book.mlr-org.com/list-pipeops.html
https://mlr3book.mlr-org.com/list-pipeops.html
mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTaskPreproc -> PipeOpLearnerPred
learnerThe wrapped learner.
learner_modelThe wrapped learner's model(s).
new()Initialize a Learner Predictor PipeOp. Can be used to wrap trained or untrainted mlr3 learners.
PipeOpLearnerPred$new(learner, id = NULL, param_vals = list())mlr3pipelines::PipeOp -> PipeOpMCBoost
predict_typePredict type of the PipeOp.
new()Initialize a Multi-Calibration PipeOp.
PipeOpMCBoost$new(id = "mcboost", param_vals = list())