Improved compatibility calculation
This commit is contained in:
parent
c8d147deb8
commit
f782040328
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user