src.report.classification_report

Classes

ClassificationReport(**kwargs)

class src.report.classification_report.ClassificationReport(**kwargs)
Author:

Alberto M. Esmoris Pena

Class to handle reports related to classifications. See Report. See also ClassificationModel.

Variables:
__init__(**kwargs)

Initialize an instance of ClassificationReport.

Parameters:

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

to_global_eval_string()

Generate the string representing the classification report with respect to the global evaluation.

Returns:

String representing the classification report with respect to the global evaluation.

to_class_eval_string()

Generate the string representing the classification report with respect to the class-wise evaluation.

Returns:

String representing the classification report with respect to the class-wise evaluation.

to_confusion_matrix_string()

Generate the string representing the classification report with respect to the confusion matrix.

Returns:

String representing the classification report with respect to the confusion matrix.

Return type:

str

to_class_distribution_string()

Generate the string representing the classification report with respect to the class distribution.

Returns:

String representing the classification report with respect to the class distribution.

Return type:

str

to_file(report_path, class_report_path=None, confusion_matrix_report_path=None, class_distribution_report_path=None, out_prefix=None)

Write the classification report to files.

Parameters:
Returns:

Nothing, the output is written to files.

has_global_eval_info()

Check whether the report contains information about the global evaluation.

Returns:

True if the report contains information about the global evaluation, False otherwise.

has_class_eval_info()

Check whether the report contains information about the class-wise evaluation.

Returns:

True if the report contains information about the class-wise evaluation, False otherwise.

has_confusion_matrix()

Check whether the report contains the confusion matrix.

Returns:

True if the report contains the confusion matrix, False otherwise.

has_class_distribution_info()

Check whether the report contains information about the class distribution.

Returns:

True if the report contains information about the class distribution, False otherwise.