{"id":28100742,"url":"https://github.com/poloclub/gam-coach","last_synced_at":"2025-08-01T21:04:39.942Z","repository":{"id":93116148,"uuid":"413988108","full_name":"poloclub/gam-coach","owner":"poloclub","description":"Personal coach to help you obtain desired AI decisions!","archived":false,"fork":false,"pushed_at":"2023-10-03T15:17:48.000Z","size":39921,"stargazers_count":17,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-10T15:17:47.125Z","etag":null,"topics":["counterfactual-explanations","generalized-additive-models","integer-programming","interactive-visualizations","machine-learning","recourse","visualization"],"latest_commit_sha":null,"homepage":"https://poloclub.github.io/gam-coach/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poloclub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-10-05T21:46:18.000Z","updated_at":"2024-12-12T07:39:56.000Z","dependencies_parsed_at":"2023-10-03T13:51:29.187Z","dependency_job_id":null,"html_url":"https://github.com/poloclub/gam-coach","commit_stats":{"total_commits":280,"total_committers":1,"mean_commits":280.0,"dds":0.0,"last_synced_commit":"7a987791d1a4f5bd8bbc6324e2e4edc02229202f"},"previous_names":["xiaohk/gam-coach"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poloclub%2Fgam-coach","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poloclub%2Fgam-coach/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poloclub%2Fgam-coach/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poloclub%2Fgam-coach/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poloclub","download_url":"https://codeload.github.com/poloclub/gam-coach/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253433703,"owners_count":21907779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["counterfactual-explanations","generalized-additive-models","integer-programming","interactive-visualizations","machine-learning","recourse","visualization"],"created_at":"2025-05-13T18:38:44.444Z","updated_at":"2025-05-13T18:38:45.041Z","avatar_url":"https://github.com/poloclub.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GAM Coach \u003ca href=\"https://poloclub.github.io/gam-coach/\"\u003e\u003cimg align=\"right\" src=\"gamcoach-ui/src/img/icon-gamcoach.svg\" height=\"35\"\u003e\u003c/img\u003e\u003c/a\u003e\n\nAn interactive tool to help everyday users discover actionable strategies to obtain desired AI decisions.\n\n[![build](https://github.com/poloclub/gam-coach/workflows/build/badge.svg)](https://github.com/poloclub/gam-coach/actions)\n[![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/poloclub/gam-coach/blob/master/LICENSE)\n[![doc](https://img.shields.io/badge/doc-available-blue)](https://poloclub.github.io/gam-coach/docs/gamcoach)\n![npm](https://img.shields.io/npm/v/gamcoach)\n[![pypi](https://img.shields.io/pypi/v/gamcoach?color=blue)](https://pypi.python.org/pypi/gamcoach)\n[![arxiv badge](https://img.shields.io/badge/arXiv-2302.14165-red)](https://arxiv.org/abs/2302.14165)\n\u003c!-- [![DOI:10.1145/3491101.3519653](https://img.shields.io/badge/DOI-10.1145/3491101.3519653-blue)](https://doi.org/10.1145/3491101.3519653) --\u003e\n\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"4\"\u003e\u003ca href=\"https://poloclub.github.io/gam-coach\"\u003e\u003cimg src='https://i.imgur.com/yOmEBz6.png'\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"https://poloclub.github.io/timbertrek\"\u003e🚀 Live Demo\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://youtu.be/ubacP34H9XE\"\u003e📺 Demo Video\u003c/a\u003e\u003c/td\u003e\n    \u003c!-- \u003ctd\u003e\u003ca href=\"https://youtu.be/l1mr9z1TuAk\"\u003e👨🏻‍🏫 Conference Talk\u003c/a\u003e\u003c/td\u003e --\u003e\n    \u003ctd\u003e\u003ca href=\"https://arxiv.org/abs/2302.14165\"\u003e📖 Research Paper\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## What is GAM Coach?\n\nGAM Coach is an interactive tool that helps *everyday users* **understand** and **alter** machine learning models' decisions.\nIt 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!\nFor example, if a user wants to get approved for a loan, GAM Coach may suggest they increase their credit score.\nIf the user finds it difficult to increase their credit score, GAM Coach will search for alternative strategies, such as lowering the loan amount.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/15007159/230276843-f82102ec-ad5e-425e-a9e5-6f62127d0ee6.gif\" width=\"100%\"\u003e\n\n## Live Demo\n\nFor a live demo, visit: \u003chttps://poloclub.github.io/gam-coach/\u003e\n\n## Running Locally\n\nClone or download this repository:\n\n```bash\ngit clone git@github.com:poloclub/gam-coach.git\n\n# use --depth if you don't want to download the whole commit history\ngit clone --depth 1 git@github.com:poloclub/gam-coach.git\n```\n\nInstall the dependencies:\n\n```bash\ncd gamcoach-ui\nnpm install\n```\n\nThen run GAM Coach:\n\n```bash\nnpm run dev\n```\n\nNavigate to [localhost:5005](https://localhost:5005). You should see GAM Coach running in your browser :)\n\n## Use the Python Library\n\nYou 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`.\n\nThen, you only need one function call to generate customizable counterfactual examples for your GAM models!\n\n```python\nimport gamcoach as coach\n\n# First create a GAM Coach object\n# It requires to provide the training data, so it can generate better CFs based\n# on the data distribution\nmy_coach = coach.GAMCoach(ebm, x_train)\n\ncfs = my_coach.generate_cfs(\n    cur_example,\n    total_cfs=3,\n    # List of features that the CFs can change\n    features_to_vary=['loan_amnt', 'term', 'emp_length', 'home_ownership',\n                      'annual_inc', 'purpose', 'dti', 'open_acc', 'revol_bal',\n                      'revol_util', 'total_acc', 'application_type', 'mort_acc',\n                      'fico_score'],\n    # Some continuous features need to have integer values in practice\n    continuous_integer_features=['open_acc', 'total_acc', 'mort_acc', 'fico_score']\n)\n```\n\nFor more details and examples, read our [documentation](https://poloclub.github.io/gam-coach/docs/gamcoach).\n\n```bash\npip install gamcoach\n```\n\n## Set Up Your Own GAM Coach\n\nIn the [demo page](https://poloclub.github.io/gam-coach), 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](https://poloclub.github.io/gam-coach/docs/gamcoach/gamcoach.html#get_model_data) for details.\n\nYou can also check out this [example notebook](examples/gam_coach_extract_model.ipynb) to see how to extract GAM model weights for GAM Coach.\n\n## Credits\n\nGAM Coach is a result of a collaboration between ML and visualization researchers from Georgia Tech and Microsoft Research.\nGAM Coach is created by \u003ca href='https://zijie.wang/' target='_blank'\u003eJay Wang\u003c/a\u003e, \u003ca href='https://www.jennwv.com' target='_blank'\u003eJenn Wortman Vaughan\u003c/a\u003e, \u003ca href='https://www.microsoft.com/en-us/research/people/rcaruana/' target='_blank'\u003eRich Caruana\u003c/a\u003e, and \u003ca href='' target='_blank'\u003ePolo Chau\u003c/a\u003e.\n\n## Citation\n\nTo learn more about GAM Coach, please read our [research paper](https://arxiv.org/abs/2302.14165) (published at [CHI 2023](https://chi2023.acm.org)).\n\n```bibTeX\n@article{wangGAMCoachInteractive2023,\n  title = {{{GAM Coach}}: {{Towards Interactive}} and {{User-centered Algorithmic Recourse}}},\n  author = {Wang, Zijie J. and Vaughan, Jennifer Wortman and Caruana, Rich and Chau, Duen Horng},\n  year = {2023},\n  doi = {10.1145/3544548.3580816}\n  journal = {arXiv:2302.14165},\n  url = {https://arxiv.org/abs/2302.14165},\n  archiveprefix = {arXiv}\n}\n```\n\n## License\n\nThe software is available under the [MIT License](https://github.com/poloclub/gamcoach/blob/master/LICENSE).\n\n## Contact\n\nIf you have any questions, feel free to [open an issue](https://github.com/poloclub/gamcoach/issues/new) or contact [Jay Wang](https://zijie.wang).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoloclub%2Fgam-coach","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoloclub%2Fgam-coach","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoloclub%2Fgam-coach/lists"}