Improved compatibility calculation
This commit is contained in:
parent
c8d147deb8
commit
f782040328
@ -58,14 +58,10 @@ function statRecords(data, features, minScore) {
|
|||||||
var count = 0;
|
var count = 0;
|
||||||
|
|
||||||
walkMatches(data, features, minScore, function(record, score) {
|
walkMatches(data, features, minScore, function(record, score) {
|
||||||
compatibility += record.compatibility;
|
compatibility += record.compatibility * score;
|
||||||
++count;
|
++count;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (count > 0) {
|
|
||||||
compatibility /= count;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
compatibility: compatibility,
|
compatibility: compatibility,
|
||||||
count: count
|
count: count
|
||||||
|
Loading…
Reference in New Issue
Block a user