attribench.plot.ConvergencePlot
- class attribench.plot.ConvergencePlot(df)[source]
Bases:
PlotLine plot of the median values of a given metric vs the number of samples. Error bars are computed using bootstrapping. Allows the user to inspect if metric values have converged, i.e. if the benchmark has been run on enough samples.
- Parameters:
- dfpd.DataFrame
Pandas dataframe containing the metric values. The columns are the names of the methods.
Methods
Render the plot.
- render(title=None, figsize=(20, 20), fontsize=None, bs_samples=1000, interval=5)[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
- bs_samplesint, optional
Number of bootstrap samples for estimating the median value of the metric using a given sample size. By default 1000
- intervalint, optional
Interval between sample sizes, by default 5
- Returns:
- Figure
The rendered Matplotlib figure.
- Return type:
Figure