Skip to content

Commit 73892fe

Browse files
committed
Small change in ranking usefullness
1 parent 124dfa9 commit 73892fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/mathematical-logic/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const isRankingUseful = (ranking: number[]) => {
4343
(score) => toFixedNumber(score, 3) <= 0.001,
4444
).length;
4545

46-
if (numOfZeros > 0) return false;
46+
if (numOfZeros > Math.round(ranking.length / 10)) return false;
4747

4848
const sortedRanking = [...ranking].sort();
4949

@@ -54,6 +54,8 @@ const isRankingUseful = (ranking: number[]) => {
5454
}
5555
const max = sortedRanking[sortedRanking.length - 1];
5656

57+
if (toFixedNumber(median, 3) <= 0.001) return false;
58+
5759
if (max / median > 10) return false;
5860

5961
return true;

0 commit comments

Comments
 (0)