Package: gamchanger
Interactive visualization tool to help domain experts and data scientists easily and responsibly edit Generalized Additive Models (GAMs).📺 Video📖 "Interpretability, Then What? Editing Machine Learning Models to Reflect Human Knowledge and Values"GAM Changer FeaturesGet StartedFor a live demo, visit:http://interpret.ml/gam-changer/How to Edit My Own GAMs?You can use this demo to edit your own GAMs: choose themy modeltab and upload themodel.json(model weights) andsample.json(sample data to evaluate the model).If you useEBM, you can generate these two files easily with the GAM Changer python package.# First install the GAM Changer python packagepipinstallgamchangerimportgamchangerasgcfromjsonimportdump# Extract model weightsmodel_data=gc.get_model_data(ebm)# Generate sample datasample_data=gc.get_sample_data(ebm,x_test,y_test)# Save to `model.json` and `sample.json`dump(model_data,open('./model.json','w'))dump(sample_data,open('./sample.json','w'))Computational Notebook WidgetYou can use GAM Changer directly in your computational notebooks (e.g., Jupyter Notebook, VSCode Notebook, Google Colab).Check out three live notebook demos below.Jupyter LiteBinderGoogle ColabUse the following snippet to load GAM Changer in your favorite notebooks:# Install the GAM Changer python package!pipinstallgamchangerimportgamchangerasgc# Load GAM Changer with the model and sample datagc.visualize(ebm,x_feed,y_feed)Load Edited ModelsAfter finishing editing a model, you can save the new model along with all the editing history to a*.gamchangerfile by clicking the save button. You can load the new model in Python:fromjsonimportloadimportgamchangerasgc# Load the `*.gamchanger` filegc_dict=load(open('./edit-8-27-2021.gamchanger','r'))# This will return a deep copy of your original EBM where edits are appliednew_ebm=gc.get_edited_model(ebm,gc_dict)DevelopmentClone or download this repository:gitclonegit@github.com:interpretml/gam-changer.git# use degit if you don't want to download commit historiesdegitinterpretml/gam-changer.gitInstall the dependencies:npminstallThen run GAM Changer:npmrundevNavigate tolocalhost:5000. You should see GAM Changer running in your browser :)CreditsGAM Changer is created byJay Wang,Alex Kale,Harsha Nori,Peter Stella,Mark Nunnally,Polo Chau,Mickey Vorvoreanu,Jenn Wortman Vaughan,
andRich Caruana,
which was the result of a research collaboration between
Microsoft Research, NYU Langone Health, Georgia Tech and University of Washington.
Jay Wang and Alex Kale were summer interns at Microsoft Research.We thank Steven Drucker, Adam Fourney, Saleema Amershi, Dean Carignan, Rob DeLine, Haekyu Park, and the InterpretML team for their support and constructive feedback.Citation@inproceedings{wangInterpretabilityThenWhat2022,title={Interpretability, {{Then What}}? {{Editing Machine Learning Models}} to {{Reflect Human Knowledge}} and {{Values}}},shorttitle={Interpretability, {{Then What}}?},booktitle={Proceedings of the 28th {{ACM SIGKDD International Conference}} on {{Knowledge Discovery}} \& {{Data Mining}}},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},year={2022},url={https://interpret.ml/gam-changer},}LicenseThe software is available under theMIT License.ContactIf you have any questions, feel free toopen an issueor contactJay Wang.