It’s useful to have a package with the modest ambition of providing Julia’s answer to the p-, q-, r- functions for the standard distributions, which Distributions.jl currently does more or less well.
When it comes to all the fancy probabilistic programming stuff, is the overarching vision that Julia’s implementation of “the gamma distribution” is ultimately a special case of the same framework that addresses posterior sampling over tree spaces and things like that?
No, the goals are more modest of having something simple which doesn’t tend to go in the way by making a lot of specific traditional assumptions (e.g. all distributions are either float-continues, or integer-discrete, and all samples are either <: Number' or <: Array`). You cannot even nicely represent a Spike and Slab or weighted samples in distributions.This allows to do more fancy things, that is nice of course, but posterior sampling over tree spaces is not the pressing motivation.
Hey look someone found my packages! If there is interest I will update them and make them more accessible. They were just quick implementations I made because I needed the functionality for another project.
Co-authors and I are working (slowly) on a package for multi-variate truncated distributions. Initially multi-variate normal. Also with the ability to fit parameters in cases where desired moments are specified, extending some early univariate idea in this paper. Related (although it doesn’t do moment matching) is this R package, MomTrunc.
Any suggestions or comments on how to best squeeze this in the current eco-system would be greatly appreciated.
Smaller packages are also harder to discover.
Eg Users have searched for SkewNormal w/o knowing about SkewDist .jl
There are far more eyes on bigger packages such as Distributions .jl. When a distribution is added there, other users regularly report bugs & submit PRs w/ bug fixes & improvements.
For example, the Beta was added years ago by one set of users, but was improved/updated w/ various PRs by other users over the years.
Looking at the data above, users seem less likely to try to maintain & submit PRs to small private packages.
We’ve discussed the pros & cons of this on Discourse & elsewhere.
Good luck w/ your decision & I can’t wait to try out your package.
I have started working on a un-published package on Random Matrix a few weeks ago.
The goal is to gradually improve it in the next few months as I learned more about Julia while working on this project. And hopefully it will be something worth release at the end of the summer.
One of the nice features of Distributions.jl is the ability to create new transformed distributions from existing distributions.
MixtureModel([Normal(0,1),Cauchy(0,1)], [0.5,0.5]) returns a new random variable
Truncated(Cauchy(0,1), 0.25, 1.8)
A recent PR proposes folded distributions.
This is cool b/c it automatically allows the user to access a large number of distributions:
There has been discussion about a generic ZeroInflated distribution here, here, here
The way Julia handles this stuff is just miles ahead of other languages thanks to first class structs etc. In R you would have to write all the rfoo,pfoo,dfoo functions even if they are trivially derived from something else. In Stan you have to write your own logpdf functions etc as well, the ability to just say stuff like convolve(A,B) is truly fabulous.
I should probably include distributions in my tutorial vignettes I’m working on.