-
Notifications
You must be signed in to change notification settings - Fork 347
Pzheng/gaussian euclidean #448
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
Pzheng/gaussian euclidean #448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be nice to add a method like:
def sample(r: java.util.Random): Doubleto get a sample from this distribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or possibly take it further and integrate with https://github.com/jliszka/probability-monad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually have some code internal to Twitter that has this as well as some bootstrap and chernov/hoeffding-bound based randomized testing. I should release that (and perhaps make it work with the the code above rather than mine which is just a Reader monad on java.util.Random).
|
Thanks for doing this! Just some minor cleanups requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, this should be a method on the case class, and it should be scaled:
mean + r.nextGaussian() * stddev|
Thank you! |
Add gaussian distribution monoid