attribench.plot.WilcoxonSummaryPlot

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

Bases: Plot

Summary plot for Wilcoxon tests. Plots the significance and effect sizes of Wilcoxon tests for each metric and each method in a heatmap. Every glyph on the heatmap corresponds to a Wilcoxon test between a given method and the random baseline on the given metric.

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=(20, 20), fontsize=None, glyph_scale=1500, method_order=None)[source]

Render the plot.

Parameters:
titlestr | None, optional

Title of the figure, by default None

figsizeTuple[int, int], optional

Figure size, by default (20, 20)

fontsizeint | None, optional

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

glyph_scaleint, optional

Scale of heatmap glyphs, by default 1500

method_orderList[str] | None, optional

Order in which methods should be displayed. If None, the order of the keys in the dictionary that was passed to the constructor will be used. By default None.

Returns:
Figure

The rendered Matplotlib figure.

Return type:

Figure