philihp / openskill.js

A faster, open-license alternative to Microsoft TrueSkill
https://www.npmjs.com/package/openskill
MIT License
193 stars 17 forks source link

fix: predictDraw should give same result as python #642

Closed philihp closed 1 month ago

philihp commented 2 months ago

I think maybe #611 didn't exactly get us there. This creates some tests pulled from https://github.com/philihp/openskill.js/issues/599 and from https://openskill.me, and the Javascript library should give the same result.

vivekjoshy commented 2 months ago

@philihp lots of things have changed since v5.1.1 btw, for instance, predict_draw no longer ranges between 0 and 1, but between 0 and 0.5 to make it obvious that the variance is taken into account. Weights is also implemented now for rate. I was going to make an issue on this repo, but might as well comment here now.

philihp commented 1 month ago

Thanks! Yeah I was looking at the Python code and it looks like a lot has changed.

philihp commented 1 month ago

I'm seeing that you have predict functions attached to the model. Do you anticipate they'll be different?

vivekjoshy commented 1 month ago

No, that was done when I was considering adding other models. It actually does not make sense anymore. I will have to get around to changing it back to the way it was before, but for now it's easier to test things this way.

coveralls commented 1 month ago

Coverage Status

coverage: 100.0%. remained the same when pulling fac4c538e1dc4a2df64b0bcb1f0cd2b724f111d2 on predict-draw-parity into 6973ba14625bff87a163b731d60356410a1d23b7 on main.