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

Added output of the number of introduced and corrected errors on the dev to train_error_corpus

parent c85bd342
No related branches found
No related tags found
No related merge requests found
......@@ -265,21 +265,25 @@ std::map<std::string, std::pair<float, std::pair<float, float> > > getScoreOnDev
}
}
fprintf(stderr, "Class 0 nbExemples : %d\n", pred0Hyp0+pred1Hyp0);
int nbErrorsIntroduced = pred1Hyp0;
int nbErrorsCorrected = pred1Hyp1;
fprintf(stderr, "\nClass 0 nbExemples : %d\n", 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+pred1Hyp0));
fprintf(stderr, "Class 1 nbExemples : %d\n", pred0Hyp1+pred1Hyp1);
fprintf(stderr, "Class 1 precision : %.2f%%\n", 100.0*pred1Hyp1 / (pred1Hyp1+pred1Hyp0));
fprintf(stderr, "Class 1 recall : %.2f%%\n", 100.0*pred1Hyp1 / (pred1Hyp1+pred0Hyp1));
fprintf(stderr, "Class 1 recall : %.2f%%\n\n", 100.0*pred1Hyp1 / (pred1Hyp1+pred0Hyp1));
fprintf(stderr, "Nb errors introduced : %d\n", nbErrorsIntroduced);
fprintf(stderr, "Nb errors corrected : %d\n", nbErrorsCorrected);
fprintf(stderr, "Difference : %d\n", nbErrorsCorrected-nbErrorsIntroduced);
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*pred1Hyp1 / (pred1Hyp1+pred1Hyp0);
}
return scores;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment