Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Has anyone been able to reproduce the experiments? #5

Open
cmougan opened this issue Dec 24, 2021 · 2 comments
Open

Has anyone been able to reproduce the experiments? #5

cmougan opened this issue Dec 24, 2021 · 2 comments

Comments

@cmougan
Copy link

cmougan commented Dec 24, 2021

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 :)

@cmougan
Copy link
Author

cmougan commented Jan 7, 2022

@mbilalzafar is it possible to know the python version and the requirements.txt used?

@mbilalzafar
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants