mirror of https://github.com/apache/lucene.git
[LUCENE-4345] - adding kNN score as count / k but no need to retrieve it from the map
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1403799 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
010c5f8d98
commit
52ef9d2752
|
@ -77,7 +77,7 @@ public class KNearestNeighborClassifier implements Classifier {
|
|||
assignedClass = cl;
|
||||
}
|
||||
}
|
||||
double score = classCounts.get(assignedClass) / k;
|
||||
double score = max / k;
|
||||
return new ClassificationResult(assignedClass, score);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue