-
Notifications
You must be signed in to change notification settings - Fork 62
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
Generalize from double: with type family #177
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for monad-bayes ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
||
-- | Draw from a uniform distribution. | ||
uniform :: | ||
-- | lower bound a | ||
Double -> | ||
(Real m) -> |
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.
(Real m) -> | |
Real m -> |
@mknorps @idontgetoutmuch If we still want HMC, we'll need to merge/rebase this branch: it generalizes from Double in a way that allows for automatic differentiation. |
@reubenharry What is missing? Do you need any help? We're working around |
Do we need BTW we should also check performance before and after generalising |
|
I understand but I think the maintainer would be sympathetic to generalising it provided we did not impact performance. |
@turion So the |
I'm not against generalization but it's kind of tricky. Some generators would be easy: exponential do not require anything beyond |
Why is that? It seems to me that the table is calculated in Haskell as well, so one could calculate several tables, possibly creating a type class for this. |
Why ziggurat? It's fast. Last time I run benchmarks (several years before random 1.2) it was only tens of percent slower than generation of Double. I didn't compare it with inversion method though. Creating type class is possible but that's road leads to type class per distribution. |
No description provided.