Python library for direct and indirect discrimination prevention in data mining

This python library implements the discrimination discovery and prevention method proposed in the paper: “A methodology for direct and indirect discrimination prevention in data mining”, Hajian and Domingo-Ferrer, 2012. The method evaluates and treats data sets of individuals removing direct and/or indirect discrimination biases preserving their data quality. The developed python library includes data transformation methods, based on measures for both direct and indirect discrimination and can deal with several discriminatory attributes. For this purpose, the library also include metrics that specify which records should be changed and how those records should be changed during the data transformation for discrimination prevention. In addition, we also implement the necessary metrics to measure the information loss and discrimination risk resulting of the data transformation process. On a more technical side, the antidiscrimination tool is offered as an open source python library supporting standard CSV datasets with any type of attributes. It includes a “readme” file describing its use and a testing file showing how to protect an example dataset and how to calculate the metrics measuring the information loss and discrimination risk of the protected data. The testing file can be easily executed by non-developers from the command line, as described in the readme file. Programmatically, the implemented library can be used through calls to the developed API, as it is also described in the readme file.

Data and Resources
To access the resources you must log in
  • Link to libraryGitHub

    The resource: 'Link to library' is not accessible as guest user. You must login to access it!
Additional Info
Field Value
Accessibility Both
AccessibilityMode Download
Availability On-Line
Basic rights Download
CreationDate 2022-01-12
Creator Martínez, Sergio,,
Field/Scope of use Any use
Group Ethics and Legality
Group Sustainable Cities for Citizens
Hosting Environment GitHub
Owner Martínez, Sergio,,
ProgrammingLanguage Python
RelatedPaper S. Hajian and J. Domingo-Ferrer, "A methodology for direct and indirect discrimination prevention in data mining", IEEE Transactions on Knowledge and Data Engineering, Vol. 25, no. 7, pp. 1445-1459, Jun 2013, ISSN: 1041-4347. DOI:
Sublicense rights No
Territory of use World Wide
Thematic Cluster Privacy Enhancing Technology [PET]
system:type Method
Management Info
Field Value
Author Jesús A. Manjón
Maintainer Sergio Martínez
Version 1
Last Updated 8 September 2023, 13:18 (CEST)
Created 12 January 2022, 10:57 (CET)