src.plot.class_reduction_plot

Classes

ClassReductionPlot(**kwargs)

class src.plot.class_reduction_plot.ClassReductionPlot(**kwargs)
Author:

Alberto M. Esmoris Pena

Class to plot the results of a class reduction task.

See MplPlot and ClassReducer.

Variables:
  • original_class_names (list of str) – The names of the original classes.

  • yo (np.ndarray) – The original classification.

  • reduced_class_names (list of str) – The names of the reduced classes.

  • yr (np.ndarray) – The reduced classification.

__init__(**kwargs)

Initialize an instance of ClassReductionPlot.

Parameters:

kwargs – The key-word arguments defining the plot’s attributes.

plot(**kwargs)

Plot the class distribution of the original and reduced classes.

See plot.Plot.plot().

plot_class_distribution(ax, class_names, y)

Plot the class distribution.

Parameters:
  • ax – The axes where the plot must be drawn.

  • class_names – The name for each class.

  • y – The point-wise classes.

Returns:

Nothing at all, but the subplot is drawn in the given axes.