shapiq.plot.force_plotΒΆ
- shapiq.plot.force_plot(interaction_values, *, feature_names=None, abbreviate=True, show=False, figsize=(15, 4), draw_higher_lower=True, contribution_threshold=0.05)[source]ΒΆ
Draws a force plot for the given interaction values.
- Parameters:
interaction_values (
InteractionValues) β TheInteractionValuesto be plotted.feature_names (
ndarray|list[str] |None) β The names of the features. IfNone, the features are named by their index.show (
bool) β Whether to show or return the plot. Defaults toFalseand returns the plot.abbreviate (
bool) β Whether to abbreviate the feature names. Defaults toTrue.figsize (
tuple[int,int]) β The size of the figure. Defaults to(15, 4).draw_higher_lower (
bool) β Whether to draw the higher and lower indicator. Defaults toTrue.contribution_threshold (
float) β Define the minimum percentage of the total effect that a feature must contribute to be shown in the plot. Defaults to 0.05.
- Returns:
The figure of the plot
- Return type: