groupwise_metrics {mlr3fairness} | R Documentation |
Evaluate a metric on each protected subgroup in a task.
Description
Instantiates one new measure per protected attribute group in a task. Each metric is then evaluated only on predictions made for the given specific subgroup.
Usage
groupwise_metrics(base_measure, task, intersect = TRUE)
Arguments
base_measure |
( |
task |
|
intersect |
|
Value
list
List of mlr3::Measures.
See Also
Examples
library("mlr3")
t = tsk("compas")
l = lrn("classif.rpart")
m = groupwise_metrics(msr("classif.acc"), t)
l$train(t)$predict(t)$score(m, t)
[Package mlr3fairness version 0.3.2 Index]