1

Improved compatibility calculation

This commit is contained in:
Alex Yatskov 2015-03-22 11:51:05 +09:00
parent c8d147deb8
commit f782040328

View File

@ -58,14 +58,10 @@ function statRecords(data, features, minScore) {
var count = 0;
walkMatches(data, features, minScore, function(record, score) {
compatibility += record.compatibility;
compatibility += record.compatibility * score;
++count;
});
if (count > 0) {
compatibility /= count;
}
return {
compatibility: compatibility,
count: count