Skip to content

Commit 596bd4f

Browse files
committed
RUL-72 results of prediction more deterministic - ordering by label name when equals
1 parent e9f5a1b commit 596bd4f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

adaa.analytics.rules/src/main/java/adaa/analytics/rules/logic/representation/ClassificationRuleSet.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ public double predict(Example example) throws OperatorException {
130130
if (votes[i] > maxVote) {
131131
maxVote = votes[i];
132132
result = i;
133+
}else if (votes[i]==maxVote)
134+
{
135+
if (label.getMapping().mapIndex(i).compareTo(label.getMapping().mapIndex(result))<0)
136+
{
137+
maxVote = votes[i];
138+
result = i;
139+
}
133140
}
134141
}
135142
calculateConfidence(example, votes, votesSum, result);

0 commit comments

Comments
 (0)