waterfall_plot
Plot SHAP's waterfall plot for a single prediction. The SHAP value
of a feature represents the impact of the evidence provided by that
feature on the model’s output. The waterfall plot is designed to
visually display how the SHAP values (evidence) of each feature move
the model output from our prior expectation under the background
data distribution, to the final model prediction given the evidence
of all the features. Features are sorted by the magnitude of their
SHAP values with the smallest magnitude features grouped together
at the bottom of the plot when the number of features in the models
exceeds the show
parameter. Read more about SHAP plots in the
user guide.
Parameters: |
models: str, sequence or None, optional (default=None)
index: int or None, optional (default=None)
show: int or None, optional (default=None)
target: int or str, optional (default=1)
title: str or None, optional (default=None)
figsize: tuple or None, optional (default=None)
filename: str or None, optional (default=None)
display: bool or None, optional (default=True) |
Returns: |
fig: matplotlib.figure.Figure Plot object. Only returned if display=None .
|
Example
from atom import ATOMClassifier
atom = ATOMClassifier(X, y)
atom.run("Tree")
atom.tree.waterfall_plot(index=120)