Description
Background
We should also make sure that our documentation is kept up to date.
A scour through the open issues in this repo and also on StackOverflow shows that the outdated documentation (or lackthereof) is causing confusion among our users.
Just some examples:
- Shap.plots.txt(shap_values) raises error "integer argument expected, got float" #2786
- https://stackoverflow.com/q/76522186
Plan
The plan here is to thoroughly go through each and every notebook example that we have, to:
- Run the notebook from top-to-bottom and ensure there are no errors.
- Update the prose where necessary to provide better clarity and fix any typos
- Update the code (where necessary and appropriate) to demonstrate up-to-date API & python features, such as:
- Replacing the deprecated boston dataset
- Using the
Explanation
API for plotting (e.g.shap.plots.beeswarm
rather thanshap.summary_plot
)
An example of such a PR: #3037
Useful info for contributors
To potential contributors (thank you in advance!), please stick to one notebook per PR when contributing.
Also, any help in updating the GPU-related notebooks would be very much appreciated.
We have two linting checks for notebooks, each of which has an "exclude list" that ignores notebooks that haven't been cleaned. When a notebook has been fixed up, it should be removed from the "exclude" list in these places:
- The
run_notebooks_timeout
job inscripts/run_notebooks_timeouts.py
- The
nbcheckorder
job in.pre-commit-config.yaml
For more details on how to preview the built documentation, see the contributing guide.
TODO
- notebooks
- text_examples
- language_modelling
- Language Modeling Explanation Demo.ipynb (fix typos in notebook #3691)
- text_generation
- Open Ended GPT2 Text Generation Explanations.ipynb
- question_answering
- Explaining a Question Answering Transformers Model.ipynb
- translation
- Machine Translation Explanations.ipynb
- summarization
- Abstractive Summarization Explanation Demo.ipynb
- text_entailment
- Textual Entailment Explanation Demo.ipynb
- sentiment_analysis
- Using custom functions and tokenizers.ipynb
- Emotion classification multiclass example.ipynb
- Positive vs. Negative Sentiment Classification.ipynb
- Keras LSTM for IMDB Sentiment Classification.ipynb
- language_modelling
- image_examples
- image_captioning
- Image Captioning using Azure Cognitive Services.ipynb
- Image Captioning using Open Source.ipynb
- image_classification
- Explain ResNet50 using the Partition explainer.ipynb
- PyTorch Deep Explainer MNIST example.ipynb (DOCS: Update pytorch deep explainer MNIST example notebooks #3591)
- Explain MobilenetV2 using the Partition explainer (PyTorch).ipynb
- Multi-class ResNet50 on ImageNet (TensorFlow)-checkpoint.ipynb
- Front Page DeepExplainer MNIST Example.ipynb (Notebook: Front Page DeepExplainer MNIST Example #3393)
- Multi-class ResNet50 on ImageNet (TensorFlow).ipynb
- Multi-input Gradient Explainer MNIST Example.ipynb
- Explain an Intermediate Layer of VGG16 on ImageNet (PyTorch).ipynb
- Image Multi Class.ipynb
- Explain an Intermediate Layer of VGG16 on ImageNet.ipynb
- image_captioning
- benchmarks
- tabular
- Tabular Prediction Benchmark Demo.ipynb (Notebook: Tabular prediction Benchmark #3338)
- Benchmark XGBoost explanations.ipynb (Notebook: benchmark xgboost #3339)
- others
- Benchmark Debug Mode.ipynb
- image
- Image Multiclass Classification Benchmark Demo.ipynb
- text
- Machine Translation Benchmark Demo.ipynb
- Abstractive Summarization Benchmark Demo.ipynb
- Text Emotion Multiclass Classification Benchmark Demo.ipynb
- tabular
- overviews
- Explaining quantitative measures of fairness.ipynb
- Be careful when interpreting predictive models in search of causal insights.ipynb
- An introduction to explainable AI with Shapley values.ipynb
- genomic_examples
- DeepExplainer Genomics Example.ipynb (Notebook: DeepExplainer Genomics Example #3458)
- api_examples
- maskers
- custom.ipynb
- explainers
- Permutation.ipynb
- Exact.ipynb
- GPUTree.ipynb
- plots
- text.ipynb
- decision_plot.ipynb
- scatter.ipynb DOCS: reformat the scatter notebook in API example #3752
- waterfall.ipynb
- beeswarm.ipynb
- violin.ipynb
- image.ipynb
- bar.ipynb ENH: Prototype new plotting API for bar plot, accept and return axes #3523
- heatmap.ipynb
- maskers
- tabular_examples
- model_agnostic
- Squashing Effect.ipynb
- Census income classification with scikit-learn.ipynb
- Simple Kernel SHAP.ipynb
- Multioutput Regression SHAP.ipynb
- Iris classification with scikit-learn.ipynb
- Diabetes regression.ipynb
- Simple
BostonCalifornia Demo.ipynb (Notebook simple boston demo #3332)
- tree_based_models
- League of Legends Win Prediction with XGBoost.ipynb (DOCS: clean up league of legends notebook #3275)
- Understanding Tree SHAP for Simple Models.ipynb (DOCS: Refactor nb/understanding tree shap #3278, DOCS: Fix column indices in Understanding Tree SHAP notebook #3749)
- Census income classification with XGBoost.ipynb
- Example of loading a custom tree model into SHAP.ipynb (update example of loading custom tree model into shap #3304)
- Census income classification with LightGBM.ipynb (DOCS: refactor census income classification notebook #3303)
- Perfomance Comparison.ipynb
- NHANES I Survival Model.ipynb (Refactor nb/nhanes survival model #3395)
- Python Version of Tree SHAP.ipynb (Notebook: Python Version of Tree SHAP #3335)
- Catboost tutorial.ipynb (Replaced Boston dataset with California in Catboost tutorial #3214)
- Scatter Density vs. Violin Plot Comparison.ipynb (refactor scatter vs violin plot #3396)
- Explaining a simple OR function.ipynb (Revamp the "Explaining a simple OR function" notebook #3037)
- Basic SHAP Interaction Value Example in XGBoost.ipynb (update basic shap interaction xgboost notebook #3346)
- Force Plot Colors.ipynb (Notebook: Force Plot Colors #3336)
- Fitting a Linear Simulation with XGBoost.ipynb
- Front page example (XGBoost).ipynb (Notebook: Front page example #3337)
- Explaining the Loss of a Model.ipynb
- neural_networks
- Census income classification with Keras.ipynb
- linear_models
- Sentiment Analysis with Logistic Regression.ipynb (Update nb/linear sentiment analysis #3127)
- Explaining a model that uses standardized features.ipynb (Update notebook Explaining a model that uses standardized features #3112)
- Math behind LinearExplainer with correlation feature perturbation.ipynb
- model_agnostic
- text_examples