Skip to content

Implementation of Joint Fairness Model with Applications to Risk Predictions for Under-represented Populations

Notifications You must be signed in to change notification settings

hyungrok-do/joint-fairness-model

Repository files navigation

joint-fairness-model

Implementation of the JFM from "A Joint Fairness Model with Applications to Risk Predictions for Under-represented Populations." Biometrics. (https://doi.org/10.1111/biom.13632 / https://arxiv.org/abs/2105.04648).

Dependencies


Install

Users have to compile the enclosed cython source code (tested on Windows 10, macOS Catalina 10.15.7, and Red Hat Enterprise Linux 8.2.)

git clone https://github.com/hyungrok-do/joint-fairness-model
cd joint-fairness-model
python setup.py build_ext --inplace --build-lib ./models

Models

We provide three models based on logistic regression. The model classes are similar to scikit-learn estimators inheriting from scikit-learn's BaseEstimator.

  • models.LogisticLasso for L1 penalized logistic regression (also known as logistic Lasso.)
  • models.LogisticSingleFair for the single fairness model (SFM): a logistic regression penalized by L1 penalty and fairness penalty.
  • models.LogisticJointFair for the joint fairness model (JFM): the proposed method (see paper.)

Note that LogisticLasso uses fast iterative shrinkage and thresholding algorithm (FISTA) [1] and solvers for LogisticSingleFair and LogisticJointFair are implemented with smoothing proximal gradient method [2].


Reproducing the Simulation Results

Main Simulation Scenarios

Running experiments-simulation.py will produce a single simulation results.

python experiments-simulation.py \
       --save_path path/to/save (default is the current path) \
       --name name-of-simulation (default is 'untitled') \
       --seed 55 \
       --p 100 \
       --q 40 \
       --r 20 \
       --n1 500 \
       --n2 200 \
       --b -10 \
       --t 0

We provide shell/slurm scripts to run the repeated experiments to reproduce the results for scenarios 1 through 4: run-simulation.sh and run-simulation.s. To draw the plots, run visualization-simulation-results.py.

Supplement Simulation Scenarios

run-simulation.sh and run-simulation.s will also provide the additional simulation scenarios' (1B through 4B) results.

Validation Measures

Run run-validation-measures.sh or run-validation-measures.s to get the experimental results for the validation measures. To draw the plots, run visualization-validation-measures.py.

Computation Times

Run experiment-computation-time-p.py and experiment-computation-time-n.py. Both scripts do not require any arguments.


Further Work/Comments

  • SFM and JFM for more than two groups (current codes only work for two groups just for reproducing the simulation results: the generalized version will be updated shortly.)
  • Models without intercept term will be implemented.
  • GridSearchCV of scikit-learn may not work on Windows machine (seems like multiprocessing issue.)

References

[1] Beck, A., & Teboulle, M. (2009). A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM journal on imaging sciences, 2(1), 183-202.

[2] Chen, X., Lin, Q., Kim, S., Carbonell, J. G., & Xing, E. P. (2012). Smoothing proximal gradient method for general structured sparse regression. The Annals of Applied Statistics, 719-752.

About

Implementation of Joint Fairness Model with Applications to Risk Predictions for Under-represented Populations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published