Fairness Metrics

aif360.metrics

metrics.DatasetMetric(dataset[, ...])

Class for computing metrics based on one StructuredDataset.

metrics.BinaryLabelDatasetMetric(dataset[, ...])

Class for computing metrics based on a single BinaryLabelDataset.

metrics.ClassificationMetric(dataset, ...[, ...])

Class for computing metrics based on two BinaryLabelDatasets.

metrics.SampleDistortionMetric(dataset, ...)

Class for computing metrics based on two StructuredDatasets.

metrics.MDSSClassificationMetric(dataset, ...)

Bias subset scanning is proposed as a technique to identify bias in predictive models using subset scanning [#zhang16]_.

aif360.metrics.utils

This is the helper script for implementing metrics.

metrics.utils.compute_boolean_conditioning_vector(X, ...)

Compute the boolean conditioning vector.

metrics.utils.compute_num_instances(X, w, ...)

Compute the number of instances, \(n\), conditioned on the protected attribute(s).

metrics.utils.compute_num_pos_neg(X, y, w, ...)

Compute the number of positives, \(P\), or negatives, \(N\), optionally conditioned on protected attributes.

metrics.utils.compute_num_TF_PN(X, y_true, ...)

Compute the number of true/false positives/negatives optionally conditioned on protected attributes.

metrics.utils.compute_num_gen_TF_PN(X, ...)

Compute the number of generalized true/false positives/negatives optionally conditioned on protected attributes.

metrics.utils.compute_distance(X_orig, ...)

Compute the distance element-wise for two sets of vectors.