Git Product home page Git Product logo

joint-fairness-model's Introduction

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.

joint-fairness-model's People

Contributors

hyungrok-do avatar

Forkers

nyumed-judy-lab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.