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

sqrt error with low confidence #2

Open
primalr opened this issue Jan 13, 2016 · 7 comments
Open

sqrt error with low confidence #2

primalr opened this issue Jan 13, 2016 · 7 comments

Comments

@primalr
Copy link

primalr commented Jan 13, 2016

I get Math::DomainError: Numerical argument is out of domain - "sqrt"
when running:
WilsonScore.rating_lower_bound(1, 100, 1..5, confidence: 0.12)
or
WilsonScore.rating_lower_bound(5, 25, 1..5, confidence: 0.8)

but not when running:
WilsonScore.rating_lower_bound(2, 100, 1..5, confidence: 0.12)

@cmantas
Copy link

cmantas commented Aug 11, 2017

I can confirm, even with less extreme values

pry(main)> WilsonScore.rating_lower_bound(2.0, 10, (0..2), confidence: 0.8)
Math::DomainError: Numerical argument is out of domain - "sqrt"

however the problem does not appear with correction turned off:

WilsonScore.rating_lower_bound(2.0, 10, (0..2), confidence: 0.8, correction: false)
=> 1.7178626381200672

@metatron1973

This comment was marked as spam.

@metatron1973

This comment was marked as spam.

@metatron1973

This comment was marked as spam.

@metatron1973

This comment was marked as spam.

@metatron1973

This comment was marked as spam.

@metatron1973

This comment was marked as spam.

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

Successfully merging a pull request may close this issue.

3 participants