plot_boxplot_median¶
- plot_boxplot_median(results, labels, plot_type='violin', outliers=True, title=None, y_min=None, y_max=None)[source]¶
Plot a box plot of distributions from the median.
Each row of results is an independent experiment for each element in names. This function works out the deviation from the median for each row, then plots a boxplot variant of each column.
- Parameters:
- results: np.array
Scores (either accuracies or errors) of dataset x strategy
- labels: list of estimators
List with names of the estimators
- plot_type: str, default = “violin”
This function can create four sort of distribution plots: “violin”, “swarm”, “boxplot” or “strip”. “violin” plot features a kernel density estimation of the underlying distribution. “swarm” draws a categorical scatterplot with points adjusted to be non-overlapping. “strip” draws a categorical scatterplot using jitter to reduce overplotting.
- outliers: bool, default = True
Only applies when plot_type is “boxplot”.
- title: str, default = None
Title to be shown in the top of the plot.
- y_min: float, default = None
Min value for the y_axis of the plot.
- y_max: float, default = None
Max value for the y_axis of the plot.
- Returns:
- figmatplotlib.figure.Figure
- axmatplotlib.axes.Axes
Examples
>>> from aeon.visualisation import plot_boxplot_median >>> from aeon.benchmarking.results_loaders import get_estimator_results_as_array >>> methods = ["IT", "WEASEL-Dilation", "HIVECOTE2", "FreshPRINCE"] >>> results = get_estimator_results_as_array(estimators=methods) >>> plot = plot_boxplot_median(results[0], methods) >>> plot.show() >>> plot.savefig("boxplot.pdf")