Skip to content
Snippets Groups Projects
Commit 173b1131 authored by Franck Dary's avatar Franck Dary
Browse files

corrected eval error

parent d32b4738
No related branches found
No related tags found
No related merge requests found
...@@ -253,17 +253,20 @@ std::map<std::string, std::pair<float, std::pair<float, float> > > getScoreOnDev ...@@ -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 nbExemples : %d\n", pred0Hyp0+pred1Hyp0);
fprintf(stderr, "Class 0 precision : %.2f\n", 100.0*pred0Hyp0 / (pred0Hyp0+pred1Hyp0)); fprintf(stderr, "Class 0 precision : %.2f%%\n", 100.0*pred0Hyp0 / (pred0Hyp0+pred0Hyp1));
fprintf(stderr, "Class 0 recall : %.2f\n\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 nbExemples : %d\n", pred0Hyp1+pred1Hyp1);
fprintf(stderr, "Class 1 precision : %.2f\n", 100.0*pred1Hyp1 / (pred1Hyp1+pred0Hyp1)); fprintf(stderr, "Class 1 precision : %.2f%%\n", 100.0*pred1Hyp1 / (pred1Hyp1+pred1Hyp0));
fprintf(stderr, "Class 1 recall : %.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; std::map<std::string, std::pair<float,std::pair<float,float> > > scores;
for (auto & it : counts) 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; return scores;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment