shapiq.plot.waterfall_plotΒΆ
- shapiq.plot.waterfall_plot(interaction_values, *, feature_names=None, show=False, max_display=10, abbreviate=True)[source]ΒΆ
Draws a waterfall plot with the interaction values.
The waterfall plot shows the individual contributions of the features to the interaction values. The plot is based on the waterfall plot from the SHAP package.
- Parameters:
interaction_values (
InteractionValues) β The interaction values as an interaction object.feature_names (
ndarray|list[str] |None) β The names of the features. Defaults toNone. To display feature values alongside feature names, provide strings in the format"value=feature"(e.g.,"25=Age"). The plot will show the value in gray and the feature name in black.show (
bool) β Whether to show the plot. Defaults toFalse.max_display (
int) β The maximum number of interactions to display. Defaults to10.abbreviate (
bool) β Whether to abbreviate the feature names. Defaults toTrue.
- Return type:
- Returns:
The plot if
showisFalse.