Skip to content

Conversation

@perryzheng
Copy link

Add gaussian distribution monoid

Copy link
Collaborator

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): Double

to get a sample from this distribution.

Copy link
Contributor

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

Copy link
Collaborator

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).

@johnynek
Copy link
Collaborator

johnynek commented Jun 2, 2015

Thanks for doing this! Just some minor cleanups requested.

Copy link
Collaborator

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

johnynek added a commit that referenced this pull request Jun 9, 2015
@johnynek johnynek merged commit e7924c1 into twitter:develop Jun 9, 2015
@johnynek
Copy link
Collaborator

johnynek commented Jun 9, 2015

Thank you!

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 this pull request may close these issues.

3 participants