src.eval.classification_evaluation

Classes

ClassificationEvaluation(**kwargs)

class src.eval.classification_evaluation.ClassificationEvaluation(**kwargs)
Author:

Alberto M. Esmoris Pena

Class representing the result of evaluating a classification. See ClassificationEvaluator.

Variables:
  • class_names – See ClassificationEvaluator.

  • ignore_classes – See ClassificationEvaluator.

  • metric_names – See ClassificationEvaluator.

  • class_metric_names – See ClassificationEvaluator.

  • yhat_count (np.ndarray) – The count of cases per predicted label.

  • y_count (np.ndarray) – The count of cases per expected label (real class distribution).

  • conf_mat (np.ndarray) – The confusion matrix where rows are the expected or true labels and columns are the predicted labels.

  • conf_mat_norm_type (str or None) – The type of normalization strategy to be applied to the confusion matrix when plotting it. Either None or a string from ["row", "col", "full"].

  • metric_scores (np.ndarray) – The score for each metric, i.e., metric_scores[i] is the computed score corresponding to metric_names[i].

  • class_metric_scores (np.ndarray) – The class-wise scores for each metric. class_metric_scores[i][j] is the metric i calculated for the class j.

__init__(**kwargs)

Initialize/instantiate a ClassificationEvaluation.

Parameters:

kwargs – The attributes for the ClassificationEvaluation.

report(**kwargs)

Transform the ClassificationEvaluation into a ClassificationReport.

See ClassificationReport.

Returns:

The ClassificationReport representing the ClassificationEvaluation.

Return type:

ClassificationReport

can_report()

See Evaluation and src.eval.evaluation.Evaluation.can_report().

plot(**kwargs)

Transform the ClassificationEvaluation into a ClassificationPlot.

See ClassificationPlot.

Parameters:

kwargs – The key-word arguments for the plot.

Returns:

The ClassificationPlot representing the ClassificationEvaluation.

Return type:

ClassificationPlot

can_plot()

See Evaluation and src.eval.evaluation.Evaluation.can_plot().