{"id":19505272,"url":"https://github.com/interpretml/gam-changer","last_synced_at":"2025-04-26T00:33:51.405Z","repository":{"id":41318262,"uuid":"434425497","full_name":"interpretml/gam-changer","owner":"interpretml","description":"Editing machine learning models to reflect human knowledge and values","archived":false,"fork":false,"pushed_at":"2023-10-03T06:55:41.000Z","size":19599,"stargazers_count":124,"open_issues_count":5,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-04T05:51:12.616Z","etag":null,"topics":["interpretability","machine-learning","visualization"],"latest_commit_sha":null,"homepage":"https://interpret.ml/gam-changer","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/interpretml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":"GOVERNANCE.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-03T01:12:18.000Z","updated_at":"2025-01-17T13:43:21.000Z","dependencies_parsed_at":"2023-10-03T12:12:58.219Z","dependency_job_id":null,"html_url":"https://github.com/interpretml/gam-changer","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interpretml%2Fgam-changer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interpretml%2Fgam-changer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interpretml%2Fgam-changer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interpretml%2Fgam-changer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interpretml","download_url":"https://codeload.github.com/interpretml/gam-changer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250917283,"owners_count":21507561,"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":["interpretability","machine-learning","visualization"],"created_at":"2024-11-10T22:29:26.784Z","updated_at":"2025-04-26T00:33:48.919Z","avatar_url":"https://github.com/interpretml.png","language":"JavaScript","readme":"\u003ch1\u003e\n\u003ca href=\"https://interpret.ml/gam-changer/\"\u003e\u003cimg src='https://i.imgur.com/njlqCrQ.png' width='100%'\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\nInteractive visualization tool to help domain experts and data scientists easily and responsibly edit Generalized Additive Models (GAMs).\n\n\u003c!-- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/interpretml/gam-changer/master?urlpath=lab/tree/examples/gam_changer_adult.ipynb) --\u003e\n\n[![build](https://github.com/interpretml/GAMChanger/workflows/build/badge.svg)](https://github.com/interpretml/gam-changer/actions)\n[![pypi](https://img.shields.io/pypi/v/gamchanger?color=blue)](https://pypi.org/project/gamchanger/)\n[![Lite](https://gist.githubusercontent.com/xiaohk/9b9f7c8fa162b2c3bc3251a5c9a799b2/raw/a7fca1d0a2d62c2b49f60c0217dffbd0fe404471/lite-badge-launch-small.svg)](https://interpret.ml/gam-changer/notebook/retro/notebooks/?path=gam_changer_adult.ipynb)\n[![license](https://img.shields.io/pypi/l/gamchanger?color=brightgreen)](https://github.com/interpretml/gam-changer/blob/master/LICENSE)\n[![DOI:10.1145/3534678.3539074](https://img.shields.io/badge/DOI-10.1145/3534678.3539074-blue)](https://doi.org/10.1145/3534678.3539074)\n[![arxiv badge](https://img.shields.io/badge/arXiv-2206.15465-red)](https://arxiv.org/abs/2206.15465)\n\n\u003c!-- \u003ca href=\"https://youtu.be/D6whtfInqTc\" target=\"_blank\"\u003e\u003cimg src=\"https://i.imgur.com/J3C0aov.png\" style=\"max-width:100%;\"\u003e\u003c/a\u003e --\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\"\u003e\u003cimg src='https://i.imgur.com/eKzKJfl.png'\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"https://youtu.be/D6whtfInqTc\"\u003e📺 Video\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://dl.acm.org/doi/10.1145/3534678.3539074\"\u003e📖 \"Interpretability, Then What? Editing Machine Learning Models to Reflect Human Knowledge and Values\"\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- For more information, check out our manuscript:\n\n[**GAM Changer: Editing Generalized Additive Models with Interactive Visualization**](https://arxiv.org/abs/2112.03245).\nZijie J. Wang, Alex Kale, Harsha Nori, Peter Stella, Mark Nunnally, Duen Horng Chau, Mihaela Vorvoreanu, Jennifer Wortman Vaughan, Rich Caruana.\n*arXiv:2112.03245, 2021.* --\u003e\n\n## GAM Changer Features\n\n\u003cimg align=\"center\" width=\"600px\" src=\"https://user-images.githubusercontent.com/15007159/184291928-c675b83e-be82-4206-bd30-47dc93008fec.gif\"\u003e\n\n---\n\n## Get Started\n\nFor a live demo, visit: http://interpret.ml/gam-changer/\n\n### How to Edit My Own GAMs?\n\nYou can use this demo to edit your own GAMs: choose the `my model` tab and upload the `model.json` (model weights) and `sample.json` (sample data to evaluate the model).\n\nIf you use [EBM](https://github.com/interpretml/interpret), you can generate these two files easily with the GAM Changer python package.\n\n```shell\n# First install the GAM Changer python package\npip install gamchanger\n```\n\n```python\nimport gamchanger as gc\nfrom json import dump\n\n# Extract model weights\nmodel_data = gc.get_model_data(ebm)\n\n# Generate sample data\nsample_data = gc.get_sample_data(ebm, x_test, y_test)\n\n# Save to `model.json` and `sample.json`\ndump(model_data, open('./model.json', 'w'))\ndump(sample_data, open('./sample.json', 'w'))\n```\n\n### Computational Notebook Widget\n\nYou can use GAM Changer directly in your computational notebooks (e.g., Jupyter Notebook, VSCode Notebook, Google Colab).\n\nCheck out three live notebook demos below.\n\n|Jupyter Lite|Binder|Google Colab|\n|:---:|:---:|:---:|\n|[![Lite](https://gist.githubusercontent.com/xiaohk/9b9f7c8fa162b2c3bc3251a5c9a799b2/raw/a7fca1d0a2d62c2b49f60c0217dffbd0fe404471/lite-badge-launch-small.svg)](https://interpret.ml/gam-changer/notebook/retro/notebooks/?path=gam_changer_adult.ipynb)|[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/interpretml/gam-changer/master?urlpath=lab/tree/examples/gam_changer_adult.ipynb)|[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1OgAVZKqs2VwmY13QuOjCxlOEyexsYjtm?usp=sharing)|\n\nUse the following snippet to load GAM Changer in your favorite notebooks:\n\n```python\n# Install the GAM Changer python package\n!pip install gamchanger\n\nimport gamchanger as gc\n\n# Load GAM Changer with the model and sample data\ngc.visualize(ebm, x_feed, y_feed)\n```\n\n### Load Edited Models\n\nAfter finishing editing a model, you can save the new model along with all the editing history to a `*.gamchanger` file by clicking the save button. You can load the new model in Python:\n\n```python\nfrom json import load\nimport gamchanger as gc\n\n# Load the `*.gamchanger` file\ngc_dict = load(open('./edit-8-27-2021.gamchanger', 'r'))\n\n# This will return a deep copy of your original EBM where edits are applied\nnew_ebm = gc.get_edited_model(ebm, gc_dict)\n```\n\n## Development\n\nClone or download this repository:\n\n```bash\ngit clone git@github.com:interpretml/gam-changer.git\n\n# use degit if you don't want to download commit histories\ndegit interpretml/gam-changer.git\n```\n\nInstall the dependencies:\n\n```bash\nnpm install\n```\n\nThen run GAM Changer:\n\n```bash\nnpm run dev\n```\n\nNavigate to [localhost:5000](https://localhost:5005). You should see GAM Changer running in your browser :)\n\n## Credits\n\nGAM Changer is created by \u003ca href=\"https://zijie.wang\"\u003eJay Wang\u003c/a\u003e,\n\u003ca href=\"http://students.washington.edu/kalea/\"\u003eAlex Kale\u003c/a\u003e,\n\u003ca href=\"https://www.linkedin.com/in/harshanori/\"\u003eHarsha Nori\u003c/a\u003e,\n\u003ca href=\"https://nyulangone.org/doctors/1548522964/peter-a-stella\"\u003ePeter Stella\u003c/a\u003e,\n\u003ca href=\"https://nyulangone.org/doctors/1144385360/mark-e-nunnally\"\u003eMark Nunnally\u003c/a\u003e,\n\u003ca href=\"https://www.cc.gatech.edu/~dchau/\"\u003ePolo Chau\u003c/a\u003e,\n\u003ca href=\"https://www.microsoft.com/en-us/research/people/mivorvor/\"\u003eMickey Vorvoreanu\u003c/a\u003e,\n\u003ca href=\"http://www.jennwv.com\"\u003eJenn Wortman Vaughan\u003c/a\u003e,\nand \u003ca href=\"https://www.microsoft.com/en-us/research/people/rcaruana/\"\u003eRich Caruana\u003c/a\u003e,\nwhich was the result of a research collaboration between\nMicrosoft Research, NYU Langone Health, Georgia Tech and University of Washington.\nJay Wang and Alex Kale were summer interns at Microsoft Research.\n\nWe thank Steven Drucker, Adam Fourney, Saleema Amershi, Dean Carignan, Rob DeLine, Haekyu Park, and the InterpretML team for their support and constructive feedback.\n\n## Citation\n\n```bibTeX\n@inproceedings{wangInterpretabilityThenWhat2022,\n  title = {Interpretability, {{Then What}}? {{Editing Machine Learning Models}} to {{Reflect Human Knowledge}} and {{Values}}},\n  shorttitle = {Interpretability, {{Then What}}?},\n  booktitle = {Proceedings of the 28th {{ACM SIGKDD International Conference}} on {{Knowledge Discovery}} \\\u0026 {{Data Mining}}},\n  author = {Wang, Zijie J. and Kale, Alex and Nori, Harsha and Stella, Peter and Nunnally, Mark E. and Chau, Duen Horng and Vorvoreanu, Mihaela and Vaughan, Jennifer Wortman and Caruana, Rich},\n  year = {2022},\n  url = {https://interpret.ml/gam-changer},\n}\n```\n\n## License\n\nThe software is available under the [MIT License](./LICENSE).\n\n## Contact\n\nIf you have any questions, feel free to [open an issue](https://github.com/interpretml/gam-changer/issues/new) or contact [Jay Wang](https://zijie.wang).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterpretml%2Fgam-changer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterpretml%2Fgam-changer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterpretml%2Fgam-changer/lists"}