-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ZeroDivisionError #5
Comments
Hi, I realized the error but I couldn't find a solution to fix it. In this case, both However, another implementations make different result. See the below:
Probably the expectation is Microsoft's. Both results have similar ps. Your ratings are unexpectedly too low. Are they really valid? |
https://github.com/sublee/trueskill/blob/master/trueskilltests.py#L426 I just committed 1d3208a to fix a half of the problem. Now my implementation returns |
Great - thanks for looking into this issue. I came across the error while evaluating the performance of different parameters in my project, and was aware these values were pretty extreme. I think the fix you have implemented is neater than the zero division. Thanks! |
I changed my mind. I reopened this issue. I'm still finding a solution. |
Available stats_implements: - None (default) - scipy - mpmath -- it can fix the issue #5
I added >>> from trueskill import *
>>> rate_1vs1(Rating(mu=-323.263, sigma=2.965), Rating(mu=-48.441, sigma=2.190))Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "trueskill/__init__.py", line 622, in rate_1vs1
return _g().rate_1vs1(rating1, rating2, drawn, min_delta)
File "trueskill/__init__.py", line 504, in rate_1vs1
teams = self.rate([(rating1,), (rating2,)], ranks, min_delta=min_delta)
File "trueskill/__init__.py", line 416, in rate
self.run_schedule(*args)
File "trueskill/__init__.py", line 332, in run_schedule
delta = trunc_layer[0].up()
File "trueskill/factorgraph.py", line 196, in up
w = self.w_func(*args)
File "trueskill/__init__.py", line 164, in w_win
raise FloatingPointError('Cannot calculate correctly, '
FloatingPointError: Cannot calculate correctly, set backend to 'mpmath'
>>> setup(backend='mpmath')
<TrueSkill mu=25.000 sigma=8.333 beta=4.167 tau=0.083 draw_probability=10.0% backend='mpmath'>
>>> rate_1vs1(Rating(mu=-323.263, sigma=2.965), Rating(mu=-48.441, sigma=2.190))
(Rating(mu=-273.060, sigma=2.683), Rating(mu=-75.848, sigma=2.080)) |
Hi sublee,
I have encountered a problem with the calculation of some ratings (admittedly with some rather unusual parameter settings):
The text was updated successfully, but these errors were encountered: