aif360.algorithms.preprocessing.DisparateImpactRemover

class aif360.algorithms.preprocessing.DisparateImpactRemover(repair_level=1.0, sensitive_attribute='')[source]

Disparate impact remover is a preprocessing technique that edits feature values increase group fairness while preserving rank-ordering within groups [1].

References

[1]M. Feldman, S. A. Friedler, J. Moeller, C. Scheidegger, and S. Venkatasubramanian, “Certifying and removing disparate impact.” ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2015.
Parameters:
  • repair_level (float) – Repair amount. 0.0 is no repair while 1.0 is full repair.
  • sensitive_attribute (str) – Single protected attribute with which to do repair.

Methods

fit Train a model on the input.
fit_predict Train a model on the input and predict the labels.
fit_transform Run a repairer on the non-protected features and return the transformed dataset.
predict Return a new dataset with labels predicted by running this Transformer on the input.
transform Return a new dataset generated by running this Transformer on the input.
__init__(repair_level=1.0, sensitive_attribute='')[source]
Parameters:
  • repair_level (float) – Repair amount. 0.0 is no repair while 1.0 is full repair.
  • sensitive_attribute (str) – Single protected attribute with which to do repair.
fit_transform(dataset)[source]

Run a repairer on the non-protected features and return the transformed dataset.

Parameters:dataset (BinaryLabelDataset) – Dataset that needs repair.
Returns:dataset (BinaryLabelDataset) – Transformed Dataset.

Note

In order to transform test data in the same manner as training data, the distributions of attributes conditioned on the protected attribute must be the same.