This guide describes how to get explanations from a
Model resource on
AI Platform (Unified). You can get explanations in two ways:
Online explanations: Synchronous requests to the AI Platform (Unified) API, similar to online predictions that return predictions with feature attributions.
Batch explanations: Asynchronous requests to the AI Platform (Unified) API that return predictions with feature attributions. Batch explanations are an optional part of batch prediction requests.
Before you begin
Before getting explanations, you must do the following:
This step differs depending on what type of machine learning model you use:
If you want to get explanations from a custom-trained model, then follow Configuring explanations for custom-trained models to create a
Modelthat supports Explainable AI.
If you want to get explanations from an AutoML tabular model, then train an AutoML model on a tabular dataset. There is no specific configuration required to use Explainable AI.
If you want to get online explanations, deploy the
Modelthat you created in the preceding step to an
Getting online explanations
To get online explanations, follow most of the same steps that you would to get
online predictions. However, instead of sending a
request to the
AI Platform API, send a
The following guides provide detailed instructions for preparing and sending online explanation requests:
For AutoML tabular models, read Getting online predictions from AutoML models.
For custom-trained models, read Getting online predictions from custom-trained models.
Getting batch explanations
To get batch explanations, set the
true when you create a batch prediction job.
For detailed instructions about preparing and creating batch prediction jobs, read Getting batch predictions.
- Based on the explanations you receive, learn how to adjust your
Modelto improve explanations.