Generalize from double: with type family#177
Conversation
✅ Deploy Preview for monad-bayes ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
| uniform :: | ||
| -- | lower bound a | ||
| Double -> | ||
| (Real m) -> |
There was a problem hiding this comment.
| (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.