mlr_measures_positive_probability | R Documentation |
Return the probabiliy of a positive prediction, often known as 'Calders-Wevers' gap. This is defined as count of positive predictions divided by the number of observations.
mlr3::Measure
-> MeasurePositiveProbability
new()
Initialize a Measure Positive Probability Object
MeasurePositiveProbability$new()
clone()
The objects of this class are cloneable with this method.
MeasurePositiveProbability$clone(deep = FALSE)
deep
Whether to make a deep clone.
library("mlr3")
# Create Positive Probability Measure
t = tsk("adult_train")
learner = lrn("classif.rpart", cp = .01)
learner$train(t)
measure = msr("classif.pp")
predictions = learner$predict(t)
predictions$score(measure, task = t)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.