We have two sample notebooks to help you try out AI Explanations with AI Platform. One notebook demonstrates how to get feature attributions with tabular data, and the other notebook demonstrates how to get feature attributions with image data.
Before you begin
Before using AI Explanations, you need to ensure you can train and deploy a model in AI Platform:
- Set up your local development environment.
- Set up a GCP project with billing and the necessary APIs enabled.
- Create a Cloud Storage bucket to store your training package and your trained model.
To set up your GCP project, follow the instructions provided in the sample notebooks.
Each sample notebook can be run in the following notebook environments:
Each sample notebook demonstrates the end-to-end process of training a model, deploying it for inference, getting predictions, and requesting explanations with TensorFlow 2. Additionally, both notebooks show how to visualize explanations using the Explainable AI SDK. To get started, select a sample notebook:
- AI Explanations: Explaining a tabular data model uses weather and bikeshare data to predict the duration of a bike trip, and shows how to retrieve feature attributions for structured data.
- AI Explanations: Explaining an image data model demonstrates feature attributions on images for a classification model trained on the TensorFlow Flowers dataset. This notebook demonstrates how to use both AI Explanations Integrated Gradients and XRAI techniques.
Additionally, sample notebooks using TensorFlow 1.15 are also available:
The source for all notebooks is also available on GitHub.
- Read a conceptual overview of AI Explanations.
- Understand the limitations of AI Explanations.