I’m trying to learn how to use Distributions.jl to specify probability distributions. I wanted to figure out how to create a multivariate normal distribution object (is “object” the right term?), so I looked at Multivariate Distributions · Distributions.jl.
In that doc, it suggests that there are some easy ways to get a multivariate normal with a zero mean and diagonal covariance without writing out a full vector of means and covariance matrix, but from the docs I wasn’t able to figure out how to do that.
The simplest way for people who are familiar enough with Julia syntax is to directly go into the source code and read how things are defined. For large packages, searching the keywords in the source code and occasionally using @which are typically sufficient for grabbing all the details.
Creating detailed, accurate and up-to-date documentation is extremely time-consuming. Things are changed frequently and it may take a lot of words to explain things that can be concisely expressed in a few lines of code.
I think you have a point here. I’m a frequent user of Distributions.jl so I don’t have any issues, but I can certainly see how a newcomer might find the documentation for Distributions.MvNormal to be lacking. I think if you look at the section on Distributions.AbstractMvNormal things should become much clearer, but still, there’s probably room for improvement. As @Norman pointed out, creating good, up-to-date documentation can be time consuming and it’s probably one of the best/easiest ways to contribute to a package that you are first learning about. Maybe you could write some examples and submit a pull request to help others.
Thank you all for your answers. I certainly appreciate that writing documentation is a difficult job.
I really have next to no experience with Julia, so I was wondering if there are some conventions that I was not understanding. After looking at the source and the Julia docs on constructors, I realized that MvNormal is defined like a regular function and you can overload these functions with differently typed args to define these convenience constructors.
I think I was a little confused by the MvNormal section in the docs, because under that heading it says something like “ordinary users don’t need to be concerned about these internal details” and I thought that referred to the word MvNormal itself.