Mamba.jl icon indicating copy to clipboard operation
Mamba.jl copied to clipboard

Dirichlet Process simple example

Open gcgibson opened this issue 7 years ago • 4 comments

Not sure if this example is useful in this form, please let me know if I can adapt it to something, or if you don't even want a DP example feel free to close.

gcgibson avatar Aug 25 '17 21:08 gcgibson

Yes, this example would be useful to include in the package documentation, and I would be happy to do so. Before merging the pull request, I have a couple questions about the example:

  1. In the math section of the documentation there is a tau scale parameter in the Normal distribution for y and a sigma^2 parameter in the Normal for mu; whereas, in the implementation, tau is the scale parameter for both Normals. Was the intent to have them be the same (as implemented) or to have separate ones for the two distributions (as documented)? Also note that the Distributions package parameterizes its Normal in terms of the standard deviation and thus the sigma^2 parameter in the math section of the example would be interpreted as a standard deviation.

  2. Is the sigma field in the NewUnivarDist intended to be a standard deviation? If so, it should either be squared in the sqrt of the normalizing constant of the logpdf function or pulled outside of the sqrt.

Thanks.

brian-j-smith avatar Aug 28 '17 14:08 brian-j-smith

Also I think all (or most?) of the examples use real data rather than simulation so maybe we should consider sticking to that standard.

bdeonovic avatar Aug 28 '17 16:08 bdeonovic

@bdeonovic That sounds good to me! How about the old faithful data? here

I have seen that used in a couple GMM examples, would that make sense to you?

gcgibson avatar Aug 28 '17 16:08 gcgibson

Old faithful would be a good data set for GMM (it is basically two clusters if I rememeber correctly, is that right?) another good data set is the iris data set

bdeonovic avatar Aug 28 '17 16:08 bdeonovic