Tunes optimal probability thresholds over different
"prob" is required.
Thresholds for each learner are optimized using the
Optimizer supplied via
Returns a single
This PipeOp should be used in conjunction with
PipeOpLearnerCV in order to
optimize thresholds of cross-validated predictions.
In order to optimize thresholds without cross-validation, use
in conjunction with
R6Class object inheriting from
* `PipeOpTuneThreshold$new(id = "tunethreshold", param_vals = list())` \cr (`character(1)`, `list`) -> `self` \cr
Identifier of resulting object. Default: "tunethreshold".
param_vals :: named
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default
Input and output channels are inherited from
$state is a named
list with elements
numeric learned thresholds
The parameters are the parameters inherited from
PipeOp, as well as:
Measure to optimize for.
Will be converted to a
Measure in case it is
"classif.ce", i.e. misclassification error.
Optimizer used to find optimal thresholds.
character, converts to
opt. Initialized to
Set a temporary log-level for
lgr::get_logger("bbotk"). Initialized to: "warn".
optimizer provided as a
param_val in order to find an optimal threshold.
optimizer parameter for more info.
Only methods inherited from
library("mlr3") task = tsk("iris") pop = po("learner_cv", lrn("classif.rpart", predict_type = "prob")) %>>% po("tunethreshold") task$data() pop$train(task) pop$state
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.