Model Explanations with Anchor Tabular

In this demo we will:

  • Launch an income classification model which has tabular training features

  • Send a request to get a prediction

  • Create an explainer for the model

  • Send the same request and then get an explanation for it

This model provides a model trained to predict high or low income based on demographic features from a 1996 US census.

The explanation will offer insight into why an input was classified as high or low. It uses the anchors technique to track features from training data that correlate to category outcomes.

Create Model

Use the model uri:



Get Predictions

Run a single prediction using the JSON below.

{"instances":[[39, 7, 1, 1, 1, 1, 4, 1, 2174, 0, 40, 9]]}


Add an Anchor Tabular Explainer

Create a model explainer using the URI below for the saved explainer.



Get Explanation for one Request

Resend a single request and then explain it using the JSON below:

{"instances":[[39, 7, 1, 1, 1, 1, 4, 1, 2174, 0, 40, 9]]}


Currently the display does not show feature names as they’ve not been supplied for the KFServing request. That is a planned future feature for KFServing. See the equivalent Seldon demo for explanations with feature names and for more detail.