attribench.plot.MADRatioPlot
- class attribench.plot.MADRatioPlot(dfs)[source]
Bases:
PlotBar plot of the MAD (Median Absolute Deviation) ratio for each metric. The MAD ratio is the ratio of the total MAD to the MAD within groups. If this ratio is high, it means that there are differences in method behaviour. If the ratio is close to 1, it means that the methods behave similarly. This can be viewed as a one-way ANOVA test, but using non-parametric MAD instead of sum-of-squares.
- 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 the plot.
- render(title=None, figsize=(10, 10), fontsize=20)[source]
Render the plot.
- Parameters:
- titlestr | None, optional
Title of the figure, by default None
- figsizetuple, optional
Size of the figure, by default (10, 10)
- fontsizeint, optional
Font size of x and y axis ticks, by default 20
- Returns:
- Figure
Rendered Matplotlib figure.
- Return type:
Figure