Add confusion matrix to json results

Add Aggregate method to Scores
This commit is contained in:
2024-05-10 13:42:38 +02:00
parent dd94fd51f7
commit ec0268c514
5 changed files with 59 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ namespace platform {
torch::Tensor get_confusion_matrix() { return confusion_matrix; }
std::string classification_report();
json get_confusion_matrix_json(bool labels_as_keys = false);
void aggregate(const Scores& a);
private:
std::string classification_report_line(std::string label, float precision, float recall, float f1_score, int support);
void init_confusion_matrix();