diff --git a/error_correction/src/macaon_train_error_detector.cpp b/error_correction/src/macaon_train_error_detector.cpp index 8238cc1316840e1a87a231fc7a1fb5f2c93acaa1..2270820758926adb961a5d1606d5e4e88e44cda8 100644 --- a/error_correction/src/macaon_train_error_detector.cpp +++ b/error_correction/src/macaon_train_error_detector.cpp @@ -253,17 +253,20 @@ std::map<std::string, std::pair<float, std::pair<float, float> > > getScoreOnDev } fprintf(stderr, "Class 0 nbExemples : %d\n", pred0Hyp0+pred1Hyp0); - fprintf(stderr, "Class 0 precision : %.2f\n", 100.0*pred0Hyp0 / (pred0Hyp0+pred1Hyp0)); - fprintf(stderr, "Class 0 recall : %.2f\n\n", 100.0*pred0Hyp0 / (pred0Hyp0+pred0Hyp1)); + fprintf(stderr, "Class 0 precision : %.2f%%\n", 100.0*pred0Hyp0 / (pred0Hyp0+pred0Hyp1)); + fprintf(stderr, "Class 0 recall : %.2f%%\n\n", 100.0*pred0Hyp0 / (pred0Hyp0+pred1Hyp0)); fprintf(stderr, "Class 1 nbExemples : %d\n", pred0Hyp1+pred1Hyp1); - fprintf(stderr, "Class 1 precision : %.2f\n", 100.0*pred1Hyp1 / (pred1Hyp1+pred0Hyp1)); - fprintf(stderr, "Class 1 recall : %.2f\n", 100.0*pred1Hyp1 / (pred1Hyp1+pred1Hyp0)); + fprintf(stderr, "Class 1 precision : %.2f%%\n", 100.0*pred1Hyp1 / (pred1Hyp1+pred1Hyp0)); + fprintf(stderr, "Class 1 recall : %.2f%%\n", 100.0*pred1Hyp1 / (pred1Hyp1+pred0Hyp1)); std::map<std::string, std::pair<float,std::pair<float,float> > > scores; for (auto & it : counts) - scores[it.first].first = 100.0 * it.second.second / it.second.first; + { + // scores[it.first].first = 100.0 * it.second.second / it.second.first; + scores[it.first].first = 100.0*pred1Hyp1 / (pred1Hyp1+pred1Hyp0); + } return scores; }