Learn R Programming

mlr3fairness (version 0.4.0)

mlr_measures_positive_probability: Positive Probability Measure

Description

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.

Arguments

Super class

mlr3::Measure -> MeasurePositiveProbability

Methods

Inherited methods


Method new()

Initialize a Measure Positive Probability Object

Usage

MeasurePositiveProbability$new()


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

Run this code
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)

Run the code above in your browser using DataLab