attribench.plot.WilcoxonBarPlot

class attribench.plot.WilcoxonBarPlot(dfs)[source]

Bases: Plot

Alternative to WilcoxonSummaryPlot. Shows a bar plot of effect sizes, along with a grid showing statistical significance (green if significant, red otherwise). Provides more detailed information about effect size than the summary plot. Can get crowded if there are many methods/metrics.

Parameters:
dfsDict[str, Tuple[pd.DataFrame, bool]]

A dictionary mapping metric names to tuples of dataframes and booleans. The boolean indicates whether higher values of the metric are better (True) or not (False). The dataframes should have the same columns, which are the names of the methods.

Methods

render

Render the plot.

render(title=None, figsize=(12, 6), fontsize=None)[source]

Render the plot.

Parameters:
titlestr | None, optional

Title of the figure, by default None

figsizetuple, optional

Size of the figure, by default (12, 6)

fontsizeint | None, optional

Font size of x and y axis ticks, by default None

Returns:
Figure

Rendered Matplotlib figure.

Return type:

Figure