Closed jonlawlor closed 7 years ago
The signatures were designed with interfaces in mind, but I was leaning toward not having them until it was clear what methods should belong together. I would like a sampling package that has MCMC, Importance Sampling, Latin-Hypercube, etc. It's not clear how these should look because of the univariate/multivariate problem. Those aren't goals for the dist package specifically, but they bigger picture ideas.
I guess E-M and bayesian estimation would also be applications. I'm going to flesh out some of the tests, and then I'll try to write up multivariate normal. From there I might take a stab at some sampling.
I've been playing with multivariate normal. Part of my motivation for the PRs on Symmetric and Triangular was to implement MVGauss. The covariance matrix should be symmetric. You need to compute the Cholesky decomposition to find probabilities, and Cholesky should return a triangular matrix.
In any event, it's still not clear to me if it should be in dist or in a different package mvdist. I'm leaning to one package right now, but I've felt strongly in the other direction in the past.
Here's what I have at the moment. There are lots of things wrong with it, but it's better than starting from scratch. http://play.golang.org/p/zjyKjDeR7H
After a lot more development, I think interfaces this big are not a good idea. Instead, we should focus on what the smaller interfaces needed for specific purposes.
It seems like the dist package could use an interface that all distributions satisfy. Currently it only has ParameterMarshaler, but all of the distributions have:
Although it seems like some of the other methods (such as Mode and Fit) would also be candidates for a Distribution interface. I'd like to start a discussion on what the dist package's goals are as well.