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