Skip to content

Commit

Permalink
Merge pull request #3092 from cliveseldon/3053_alibi_docs
Browse files Browse the repository at this point in the history
Update alibi docs
  • Loading branch information
axsaucedo authored Mar 29, 2021
2 parents be97543 + 8d4ed8c commit 8397e98
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 20 deletions.
15 changes: 15 additions & 0 deletions doc/source/analytics/explainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ Seldon provides model explanations using its [Alibi](https://github.com/SeldonIO

We provide [an example notebook](../examples/explainer_examples.html) showing how to deploy an explainer for Tabular, Text and Image models.


## Available Methods

Seldon Core supports a subset of the methods currently available in [Alibi](https://github.com/SeldonIO/alibi). Presently this the following:


| Method | Explainer Key | Example |
|--------|---------------|---------||
| [Anchor Tabular](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) | `AnchorTabular` | [Example](https://docs.seldon.io/projects/seldon-core/en/latest/examples/explainer_examples.html#Income-Prediction-Model-with-Anchors-Explainer) |
| [Anchor Text](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) | `AnchorText` | [Example](https://docs.seldon.io/projects/seldon-core/en/latest/examples/explainer_examples.html#Movie-Sentiment-Model) |
| [Anchor Images](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) | `AnchorImages` | [Example](https://docs.seldon.io/projects/seldon-core/en/latest/examples/explainer_examples.html#Tensorflow-CIFAR10-Model) |
| [kernel Shap](https://docs.seldon.io/projects/alibi/en/latest/methods/KernelSHAP.html) | `KernelShap` | [Example](https://docs.seldon.io/projects/seldon-core/en/latest/examples/explainer_examples.html#Wine-Prediction-Model-with-Shap-Explainer) |
| [Integrated Gradients](https://docs.seldon.io/projects/alibi/en/latest/methods/IntegratedGradients.html) | `IntegratedGradients` | [Example](https://docs.seldon.io/projects/seldon-core/en/latest/examples/explainer_examples.html#MNIST-Model-with-Integrated-Gradients-Explainer) |
| [Tree Shap](https://docs.seldon.io/projects/alibi/en/latest/methods/TreeSHAP.html) | `TreeShap` | [Example](https://docs.seldon.io/projects/seldon-core/en/latest/examples/explainer_examples.html#XGBoost-Model-with-TreeShap-Explainer) |

## Creating your explainer

For Alibi explainers that need to be trained you should
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/notebooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Advanced Machine Learning Insights
:titlesonly:

Real time monitoring of statistical metrics <feedback_reward_custom_metrics>
Tabular, Text and Image Model Explainers <explainer_examples>
Model Explainers <explainer_examples>
Outlier Detection on CIFAR10 <outlier_cifar10>

Batch Processing with Seldon Core
Expand Down
40 changes: 21 additions & 19 deletions notebooks/explainer_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,31 @@
"metadata": {},
"source": [
"# Example Model Explanations with Seldon\n",
"\n",
"Seldon core supports various out-of-the-box explainers that leverage the [Alibi ML Expalinability](https://github.com/SeldonIO/alibi) open source library.\n",
"\n",
"In this notebook we show how you can use the pre-packaged explainer functionality that simplifies the creation of advanced AI model explainers.\n",
"\n",
"Seldon provides the following out-of-the-box pre-packaged explainers:\n",
"* Anchor Tabular Explainer \n",
" * A black box Explainer that uses the [anchor technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for tabular data\n",
" * It basically answers the question of what are the most \"powerul\" or \"important\" features in a tabular prediction\n",
"* Anchor Image Explainer\n",
" * A black box Explainer that uses the [anchor technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for image data\n",
" * It basically answers the question of what are the most \"powerul\" or \"important\" pixels in an image prediction\n",
"* Anchor Text Explainer\n",
" * A black box Explainer that uses the [anchor technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for text data\n",
" * It basically answers the question of what are the most \"powerul\" or \"important\" tokens in a text prediction\n",
"* Kernel Shap Explainer\n",
" * A black box Explainer that uses the [kernel shap technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for tabular data\n",
" * It provides postive and negative feature attributions that contributed to the predictions\n",
"* Integrated Gradient Explainer\n",
" * A white box explainer that uses the [Integrated Gradients technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for Keras models\n",
" * It provides importance values for each feature\n",
"* Tree Shap Explainer\n",
" * A white box explainer that uses the [TreeShap technqiue](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for tree based models\n",
" * It provides positive and negative feature attributions that contributed to the predictions"
"\n",
" - Anchor Tabular Explainer \n",
" - A black box Explainer that uses the [anchor technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for tabular data\n",
" - It basically answers the question of what are the most \"powerul\" or \"important\" features in a tabular prediction\n",
" - Anchor Image Explainer\n",
" - A black box Explainer that uses the [anchor technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for image data\n",
" - It basically answers the question of what are the most \"powerul\" or \"important\" pixels in an image prediction\n",
" - Anchor Text Explainer\n",
" - A black box Explainer that uses the [anchor technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for text data\n",
" - It basically answers the question of what are the most \"powerul\" or \"important\" tokens in a text prediction\n",
" - Kernel Shap Explainer\n",
" - A black box Explainer that uses the [kernel shap technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for tabular data\n",
" - It provides postive and negative feature attributions that contributed to the predictions\n",
" - Integrated Gradient Explainer\n",
" - A white box explainer that uses the [Integrated Gradients technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for Keras models\n",
" - It provides importance values for each feature\n",
" - Tree Shap Explainer\n",
" - A white box explainer that uses the [TreeShap technique](https://docs.seldon.io/projects/alibi/en/latest/methods/Anchors.html) for tree based models\n",
" - It provides positive and negative feature attributions that contributed to the predictions"
]
},
{
Expand Down Expand Up @@ -1614,7 +1616,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
"version": "3.6.8"
},
"varInspector": {
"cols": {
Expand Down

0 comments on commit 8397e98

Please sign in to comment.