All Projects → GoogleCloudPlatform → ai-platform-text-classifier-shap

GoogleCloudPlatform / ai-platform-text-classifier-shap

Licence: Apache-2.0 license
Text classification demo from our Next '19 breakout session

Programming Languages

Jupyter Notebook
11667 projects
javascript
184084 projects - #8 most used programming language

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].