fix/match_collector: don't show matchup with less than 30 games
All checks were successful
pipeline / lint-and-format (push) Successful in 4m20s
pipeline / build-and-push-images (push) Successful in 50s

This commit is contained in:
2026-05-11 15:24:23 +02:00
parent 141d1b1d3a
commit e76cb3ea8e

View File

@@ -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) => {