glicko icon indicating copy to clipboard operation
glicko copied to clipboard

volatilize not used in Glicko

Open xidui opened this issue 8 years ago • 2 comments

I have read all the code of Glicko and notice that you left volatilize unused and c undefined:

def volatilize(self, rating):
    if rating.rated_at is None:
        return rating
    sigma = min(math.sqrt(rating.sigma ** 2 + c ** 2 * t), self.sigma)
    return self.create_rating(rating.mu, sigma, rating.rated_at)

I also have some confusion on c described by the paper. Is that a constant or depending on a particular user? As it is calculated like that: qq20160908-0 2x Seems randomly chosen RD and time period.

Do you hold same concern?

xidui avatar Sep 07 '16 17:09 xidui

As I understand, before put the users into rating, we should recalculate their RD:

 def rate(self, rating, series, rated_at=None):
     if rated_at is None:
         rated_at = utctime()
     d_square_inv = 0
     difference = 0
     for actual_score, other_rating in series:

        # volatilize here for each other user

         impact = self.reduce_impact(other_rating)
         expected_score = self.expect_score(rating, other_rating, impact)
         difference += impact * (actual_score - expected_score)
         d_square_inv += (
             expected_score * (1 - expected_score) *
             (Q ** 2) * (impact ** 2))
     denom = rating.sigma ** -2 + d_square_inv
     mu = rating.mu + Q / denom * difference
     sigma = math.sqrt(1. / denom)
     return self.create_rating(mu, sigma, rated_at)

Otherwise, the time period is not taken into account.

xidui avatar Sep 07 '16 17:09 xidui

I think volatilize was never used. That looks like a silly bug. Thank you for letting me know.

By the way, this project was just for my fun, not a stable project. And I've never finished it. So I won't fix it. I recommend you to not use this for your production.

If you need a rating system in Python, you should Glicko, Glicko2, or Elo by yourself. Or use TrueSkill, also I implemented. It's the most powerful rating system than the others. And the implementation has already been stable.

sublee avatar Sep 10 '16 03:09 sublee