Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

GoogleCloudPlatform/ai-platform-text-classifier-shap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text classification model interpretability demo

This code is provided as example only. It is provided without guarantee or level of support. This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.

This is the demo I presented at my Cloud Next '19 talk with Yufeng. It shows how to build a bag of words text classification model to tag ML-related Stack Overflow questions, deploy the model to AI Platform, and interpret it's predictions with SHAP. For more details on the SHAP piece of this demo, see my blog post.

Architecture diagram

Running the notebook

To run the notebook, create a new Colab notebook and import the stackoverflow-classifier.ipynb file in this repo. The CSV we used for the Stack Overflow training data is public. You'll need to create a Google Cloud project to deploy the model. If you don't want to do that, you'll still be able to run the SHAP code at the end of the notebook.

Got any feedback? File an issue or ping me on Twitter at @SRobTweets

This is not an officially supported Google product.

Releases

No releases published

Packages

No packages published