Skip to main content

GAM Coach

An interactive tool to help everyday users discover actionable strategies to obtain desired AI decisions.

build license doc npm pypi arxiv badge

🚀 Live Demo 📺 Demo Video 📖 Research Paper

What is GAM Coach?

GAM Coach is an interactive tool that helps everyday users understand and alter machine learning models' decisions. It shows users diverse ways to change their input data so that they can get a different output from the model, and it allows users to customize these suggestions through a few clicks! For example, if a user wants to get approved for a loan, GAM Coach may suggest they increase their credit score. If the user finds it difficult to increase their credit score, GAM Coach will search for alternative strategies, such as lowering the loan amount.

Live Demo

For a live demo, visit: https://poloclub.github.io/gam-coach/

Running Locally

Clone or download this repository:

git clone git@github.com:poloclub/gam-coach.git

# use --depth if you don't want to download the whole commit history
git clone --depth 1 git@github.com:poloclub/gam-coach.git

Install the dependencies:

cd gamcoach-ui
npm install

Then run GAM Coach:

npm run dev

Navigate to localhost:5005. You should see GAM Coach running in your browser :)

Use the Python Library

You can also use GAM Coach as a Python library to generate customizable counterfactual examples for generalized additive models (GAMs). You can install GAM Coach through pip.

Then, you only need one function call to generate customizable counterfactual examples for your GAM models!

import gamcoach as coach

# First create a GAM Coach object
# It requires to provide the training data, so it can generate better CFs based
# on the data distribution
my_coach = coach.GAMCoach(ebm, x_train)

cfs = my_coach.generate_cfs(
    cur_example,
    total_cfs=3,
    # List of features that the CFs can change
    features_to_vary=['loan_amnt', 'term', 'emp_length', 'home_ownership',
                      'annual_inc', 'purpose', 'dti', 'open_acc', 'revol_bal',
                      'revol_util', 'total_acc', 'application_type', 'mort_acc',
                      'fico_score'],
    # Some continuous features need to have integer values in practice
    continuous_integer_features=['open_acc', 'total_acc', 'mort_acc', 'fico_score']
)

For more details and examples, read our documentation.

pip install gamcoach

Set Up Your Own GAM Coach

In the demo page, we provide five demos with the most commonly used datasets in the algorithmic recourse literature. You can easily set up a GAM Coach for your own GAM model (with only one function call). See this documentation page for details.

You can also check out this example notebook to see how to extract GAM model weights for GAM Coach.

Credits

GAM Coach is a result of a collaboration between ML and visualization researchers from Georgia Tech and Microsoft Research. GAM Coach is created by Jay Wang, Jenn Wortman Vaughan, Rich Caruana, and Polo Chau.

Citation

To learn more about GAM Coach, please read our research paper (published at CHI 2023).

@article{wangGAMCoachInteractive2023,
  title = {{{GAM Coach}}: {{Towards Interactive}} and {{User-centered Algorithmic Recourse}}},
  author = {Wang, Zijie J. and Vaughan, Jennifer Wortman and Caruana, Rich and Chau, Duen Horng},
  year = {2023},
  doi = {10.1145/3544548.3580816}
  journal = {arXiv:2302.14165},
  url = {https://arxiv.org/abs/2302.14165},
  archiveprefix = {arXiv}
}

License

The software is available under the MIT License.

Contact

If you have any questions, feel free to open an issue or contact Jay Wang.

Metadata

Release files for gamcoach 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gamcoach 0.1.4
File Size Uploaded
gamcoach-0.1.4.tar.gz 27.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gamcoach 0.1.4
File Interpreter ABI Platform
gamcoach-0.1.4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 53.2 kB

Release files / gamcoach-0.1.4.tar.gz

Download URL gamcoach-0.1.4.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
995cc6061074bad08ba4f25bd263237ada249a51b649c11c3aa82bdefe13683e
BLAKE2b-256 checksum
How to use checksums
33a74994df05937592f08cc2c49fa0bcc8928aec2c7cc3bf6e5cc56539bcb82a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / gamcoach-0.1.4-py2.py3-none-any.whl

Download URL gamcoach-0.1.4-py2.py3-none-any.whl
Size 25.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d20beea5ea2ec7a6cbecd6ff6e5a297151357eabef983dbb81a253db19393062
BLAKE2b-256 checksum
How to use checksums
9a1e43d24ba1f767491bf5d5dcc09dc63a542acfd3f464f6fc9f6a166ea57b0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page