Skip to contents

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.

Super class

mlr3::Measure -> MeasurePositiveProbability

Methods

Inherited methods


Method new()

Initialize a Measure Positive Probability Object


Method clone()

The objects of this class are cloneable with this method.

Usage

MeasurePositiveProbability$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

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)
#> classif.pp 
#>  0.8342014