fair-classification
fair-classification copied to clipboard
Has anyone been able to reproduce the experiments?
I am trying to reproduce the disparate mistreatment experiments. There are no guidelines, I am missing:
- Python version. To reproduce the envieronment.
- Python packages. To install with pip
- Docstrings.
- Some minimal code structure that looks fairly similar to pandas or scikit-learn.
After several attempts and random guessing the above issues, the code still does not runs. It throws errors.
Any help will be very much appreciated.
Many thanks :)
@mbilalzafar is it possible to know the python version and the requirements.txt used?
Hi @cmougan. Thanks for you interest in our work :)
We used python 2.7 (we developed the code some while ago). The following environment setup should work:
conda create -n py27 python=2.7
conda activate py27
Then install the dependencies using the following requirements file:
numpy==1.16.6
scipy==1.2.3
matplotlib==2.0.2
cvxcanon==0.1.1
ecos==2.0.4
scs==1.2.6
cvxpy==0.4.9
dccp==0.1.6
sklearn
pandas
The demo files mentioned in disparate_mistreatment/README.md
(synthetic_data_demo/decision_boundary_demo.py
, synthetic_data_demo/fairness_acc_tradeoff.py
and propublica_compas_data_demo/demo_constraints.py
) should provide minimal code examples for training unconstrained and fairness-constrained classifiers.
The main function being used is train_model_disp_mist
in fair_classification/funcs_disp_mist.py
and it contains documentation of the parameters.
Let me know if you have any further questions.