Package: gamcoach
GAM CoachAn interactive tool to help everyday users discover actionable strategies to obtain desired AI decisions.🚀 Live Demo📺 Demo Video📖 Research PaperWhat is GAM Coach?GAM Coach is an interactive tool that helpseveryday usersunderstandandaltermachine 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 DemoFor a live demo, visit:https://poloclub.github.io/gam-coach/Running LocallyClone or download this repository:gitclonegit@github.com:poloclub/gam-coach.git# use --depth if you don't want to download the whole commit historygitclone--depth1git@github.com:poloclub/gam-coach.gitInstall the dependencies:cdgamcoach-ui
npminstallThen run GAM Coach:npmrundevNavigate tolocalhost:5005. You should see GAM Coach running in your browser :)Use the Python LibraryYou can also use GAM Coach as a Python library to generate customizable counterfactual examples for generalized additive models (GAMs). You can install GAM Coach throughpip.Then, you only need one function call to generate customizable counterfactual examples for your GAM models!importgamcoachascoach# First create a GAM Coach object# It requires to provide the training data, so it can generate better CFs based# on the data distributionmy_coach=coach.GAMCoach(ebm,x_train)cfs=my_coach.generate_cfs(cur_example,total_cfs=3,# List of features that the CFs can changefeatures_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 practicecontinuous_integer_features=['open_acc','total_acc','mort_acc','fico_score'])For more details and examples, read ourdocumentation.pipinstallgamcoachSet Up Your Own GAM CoachIn thedemo 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 thisdocumentation pagefor details.You can also check out thisexample notebookto see how to extract GAM model weights for GAM Coach.CreditsGAM Coach is a result of a collaboration between ML and visualization researchers from Georgia Tech and Microsoft Research.
GAM Coach is created byJay Wang,Jenn Wortman Vaughan,Rich Caruana, andPolo Chau.CitationTo learn more about GAM Coach, please read ourresearch paper(published atCHI 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}}LicenseThe software is available under theMIT License.ContactIf you have any questions, feel free toopen an issueor contactJay Wang.