Refactor aggregate score to a constructor

This commit is contained in:
2024-05-17 22:52:13 +02:00
parent 577351eda5
commit 49a36904dc
3 changed files with 12 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ namespace platform {
public:
Scores(torch::Tensor& y_test, torch::Tensor& y_pred, int num_classes, std::vector<std::string> labels = {});
explicit Scores(json& confusion_matrix_);
static Score create_aggregate(json& data, std::string key);
float accuracy();
float f1_score(int num_class);
float f1_weighted();