fix/match_collector: don't show matchup with less than 30 games
This commit is contained in:
@@ -688,8 +688,8 @@ async function finalizeChampionStats(champion: ChampionData, totalMatches: numbe
|
|||||||
// Sort matchups by score (games * winrate) in descending order
|
// Sort matchups by score (games * winrate) in descending order
|
||||||
for (const lane of champion.lanes) {
|
for (const lane of champion.lanes) {
|
||||||
if (lane.matchups && lane.matchups.length > 0) {
|
if (lane.matchups && lane.matchups.length > 0) {
|
||||||
// Filter out matchups with insufficient games (minimum 5 games)
|
// Filter out matchups with insufficient games (minimum 30 games to avoid statistical bias)
|
||||||
const filteredMatchups = lane.matchups.filter(m => m.games >= 5)
|
const filteredMatchups = lane.matchups.filter(m => m.games >= 30)
|
||||||
|
|
||||||
// Sort by score (games * (winrate - 0.5)^2) descending
|
// Sort by score (games * (winrate - 0.5)^2) descending
|
||||||
filteredMatchups.sort((a, b) => {
|
filteredMatchups.sort((a, b) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user