From c1efbec3d4b72f43632cc3a8267593e73294bb54 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Fri, 12 Mar 2021 18:33:39 -0700 Subject: Update init position of k-means --- rank.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rank.py b/rank.py index 3e538a9..0774b54 100644 --- a/rank.py +++ b/rank.py @@ -189,7 +189,7 @@ def score_takeall(a, b): # choose a smoothing function (naive, exp, normal, shock) smooth_func = smooth_naive -# choose a score function (naive, fivefive, avgscore, takeall) +# choose a score function (naive, fivefive, avg, takeall) score_func = score_naive for match in reversed(matches): @@ -237,11 +237,11 @@ for idx, name in enumerate(teams): team_rank.sort(key=lambda x: x[1], reverse=True) # Tier list using K-means -K = 4 +K = 5 rank_name = ["S", "A", "B", "C", "D", "E", "F"] means = [0] * K for i in range(K): - means[i] = team_rank[i * len(teams)//K][1] + means[i] = team_rank[(i * len(teams) * 2 + K)//(2 * K)][1] for i in range(1000): # calculate distance -- cgit v1.2.3-70-g09d2