class miml.report.report.Report(classifier: MIMLClassifier, dataset_test: MIMLDataset, metrics: list[str] | None = None, header: bool = True, per_label: bool = True)#

Bases: object

Class to generate a report

calculate_metrics()#

Calculate metrics of the predicted data

to_csv(path: str | None = None)#

Print/save data as csv format

Parameters#

pathstr, default=None

Path to csv where the data would be stored

to_string()#

Print data as string format

miml.report.report.hamming_score(y_true: ndarray, y_pred: ndarray)#

Calculate hamming score of given data

Parameters#

y_truenp.ndarray of shape (n_bags, n_labels)

Labels from the test dataset

y_prednp.ndarray of shape (n_bags, n_labels)

Predicted labels from the test dataset