Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating Point Error #228

Open
cofinley opened this issue Dec 2, 2022 · 0 comments
Open

Floating Point Error #228

cofinley opened this issue Dec 2, 2022 · 0 comments

Comments

@cofinley
Copy link

cofinley commented Dec 2, 2022

Hello,

I'm not overly familiar with the stats involved, but I'm getting a floating point error for the following example and would like to understand more about why it's happening:

import { Rating, rate_1vs1 } from "ts-trueskill"

var a = new Rating(1253.199676483443, 1.315432946114797)
var b = new Rating(2038.349704507679, 1.136131282892949)

rate_1vs1(a, b)

The initial mu is 1600 and sigma is 1600/3. Both a and b have been rated ~ 100 times.

I get the following stack trace:

Error: floating point error
    at TrueSkill._wWin (...ts-trueskill/dist/src/trueskill.js:266:15)
    at TruncateFactor.wFunc (...ts-trueskill/dist/src/trueskill.js:350:40)
    at TruncateFactor.up (...ts-trueskill/dist/src/factorgraph.js:238:24)
    at TrueSkill._runSchedule (...ts-trueskill/dist/src/trueskill.js:382:39)
    at TrueSkill.rate (...ts-trueskill/dist/src/trueskill.js:129:29)
    at rate_1vs1 (...ts-trueskill/dist/src/trueskill.js:423:23)

I'm using ts-trueskill 4.2.1

I can inspect the trace and see why the exception is being thrown from the values, but from a stats perspective, I don't know why this is happening. The variable names are somewhat terse and hard to reason about. From what I can tell, the mu and sigma values don't seem too weird, but I'm not sure. Maybe one of them is too low/high?

Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant