iFair

Implementation of the ICDE 2019 paper iFair_module: Learning Individually Fair Data Representations for Algorithmic Decision Making url: https://ieeexplore.ieee.org/document/8731591 citation: @inproceedings{DBLP:conf/icde/LahotiGW19,

author = {Preethi Lahoti and

Krishna P. Gummadi and Gerhard Weikum},

title = {iFair_module: Learning Individually Fair Data Representations for Algorithmic

Decision Making},

booktitle = {35th {IEEE} International Conference on Data Engineering, {ICDE} 2019,

Macao, China, April 8-11, 2019},

pages = {1334–1345}, publisher = {{IEEE}}, year = {2019}, url = {https://doi.org/10.1109/ICDE.2019.00121}, doi = {10.1109/ICDE.2019.00121}, timestamp = {Wed, 16 Oct 2019 14:14:56 +0200}, biburl = {https://dblp.org/rec/conf/icde/LahotiGW19.bib}, bibsource = {dblp computer science bibliography, https://dblp.org}

}

__author__: Preethi Lahoti __email__: plahoti@mpi-inf.mpg.de

class fairdiverse.search.preprocessing_model.iFair.iFair(configs, dataset)[source]

Bases: PreprocessingFairnessIntervention

iFair is a fairness intervention method based on optimization techniques.

This class extends PreprocessingFairnessIntervention and applies individual fairness constraints to data using probabilistic mapping and distance-based optimization.

fit(X_train, run)[source]

Train the iFair fairness model using the given training dataset.

This method applies optimization to learn individual fairness constraints and stores the results for later use.

:param X_trainpandas.DataFrame

The training dataset. The last column is expected to be the protected attribute.

:param runstr

The identifier for the training run.

:return : None

transform(X, run, file_name=None)[source]

Apply the fairness transformation to the dataset using the learned model.

This method ensures fairness by adjusting feature distributions while maintaining data utility.

:param Xpandas.DataFrame

The dataset to which the fairness transformation is applied.

:param runstr

The identifier for the transformation run.

:param file_namestr, optional

Name of the file to save the transformed dataset.

:returnpandas.DataFrame

The dataset with transformed fair columns.