Composite Fairness MeasureSource:
Computes a composite measure from multiple fairness metrics and aggregates them
aggfun (defaulting to
The protected attribute is specified as a
col_role in the corresponding
<Task>$col_roles$pta = "name_of_attribute"
This also allows specifying more than one protected attribute, in which case fairness will be considered on the level of intersecting groups defined by all columns selected as a predicted attribute.
Creates a new instance of this R6 class.
Id of the measure. Defaults to the concatenation of ids in
(list of MeasureFairness)
List of fairness measures to aggregate.
Aggregation function used to aggregate results from respective measures. Defaults to
The operation used to compute the difference. A function that returns a single value given input: computed metric for each subgroup. Defaults to
MeasureFairnessfor more information.
Should the measure be minimized? Defaults to
Range of the resulting measure. Defaults to
library("mlr3") # Equalized Odds Metric MeasureFairnessComposite$new(measures = msrs(c("fairness.fpr", "fairness.tpr"))) #> <MeasureFairnessComposite:fairness.fpr_tpr> #> * Packages: mlr3, mlr3fairness #> * Range: [-Inf, Inf] #> * Minimize: TRUE #> * Average: macro #> * Parameters: list() #> * Properties: requires_task #> * Predict type: response # Other metrics e.g. based on negative rates MeasureFairnessComposite$new(measures = msrs(c("fairness.fnr", "fairness.tnr"))) #> <MeasureFairnessComposite:fairness.fnr_tnr> #> * Packages: mlr3, mlr3fairness #> * Range: [-Inf, Inf] #> * Minimize: TRUE #> * Average: macro #> * Parameters: list() #> * Properties: requires_task #> * Predict type: response