Skip to content

RandomTrainingFactory.generate() produces values out of given range #111

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

Closed
tomarmo opened this issue Jun 21, 2012 · 1 comment
Closed
Milestone

Comments

@tomarmo
Copy link

tomarmo commented Jun 21, 2012

While calling
RandomTrainingFactory.generate( (long) (Math.random() * Long.MAX_VALUE), learnSetSize,1, 0, rangeBegin, rangeEnd);
I sometimes get values out of (rangeBegin; rangeEnd) range, e.g. while asking for a (-5;5) range I get values from (-15; -5) range.

It can be helped by using (Math.random() * Integer.MAX_VALUE) as a seed instead.

@jeffheaton
Copy link
Owner

This is now corrected.

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

2 participants