Skip to content
Snippets Groups Projects
Commit 1ce46e4b authored by VERNEREY Charles's avatar VERNEREY Charles
Browse files

Solve bug with Nan values in ranking metrics

parent a00ee981
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,13 @@ public class LearnFunctionAndRankCli implements Callable<Integer> {
private Map<String, String> getRankingMetricLabels(int nbRules) {
int top1 = (int) (0.01 * nbRules);
if (top1 <= 0) {
top1 = 1;
}
int top10 = (int) (0.1 * nbRules);
if (top10 <= 0) {
top10 = 1;
}
Map<String, String> labels = new HashMap<>();
labels.put(KendallConcordanceCoeff.TYPE, KendallConcordanceCoeff.TYPE);
labels.put(SpearmanRankCorrelationCoefficient.TYPE, SpearmanRankCorrelationCoefficient.TYPE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment