src.report.class_reduction_report

Classes

ClassReductionReport(**kwargs)

class src.report.class_reduction_report.ClassReductionReport(**kwargs)
Author:

Alberto M. Esmoris Pena

Class to handle reports related to class reductions. See Report. See also 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.

  • class_groups (list of str) – List such that [i] is the list of original class names that were reduced to the reduced class i.

__init__(**kwargs)

Initialize an instance of ClassReductionReport.

Parameters:

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

to_class_distribution(title, class_names, y)

Generate a string representing a class distribution.

Parameters:
  • title (str) – The title or name for the class distribution representation.

  • class_names (list of str) – The name for each class.

  • y (np.ndarray) – The class for each point.

Returns:

String representing a class distribution.

Return type:

str