Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multivariate distributions #173

Closed
fonnesbeck opened this issue Feb 12, 2013 · 6 comments
Closed

Add multivariate distributions #173

fonnesbeck opened this issue Feb 12, 2013 · 6 comments

Comments

@fonnesbeck
Copy link
Member

We at least need to have MVNormal, Multinomial, Dirichlet and Wishart.

@mrocklin
Copy link

What number of dimensions do you anticipate here. 3, 10, or 10000?

@fonnesbeck
Copy link
Member Author

I've encountered multivariate nodes of length 100, at least in applications of Bayesian hierarchical models I've seen, but thousands or tens of thousands are rare.

@jsalvatier
Copy link
Member

@fonnesbeck I've added these in https://github.com/pymc-devs/pymc/blob/8dd5bdd0e6f517a8a4b10178f76922a412f5d528/pymc/distributions/multivariate.py

I think there are still some kinks to work out though. Do you want to continue with the k-1 approach for dirichlet?

@fonnesbeck
Copy link
Member Author

I think k-1 for Dirichlet values and categorical/multinomial probabilities make sense, as it removes the potential for error when specifying vectors that must sum exactly to one.

@jsalvatier
Copy link
Member

My current approach to this is to specify the Dirichlet distribution in the canonical way and then apply a 'transform' from the size k-1 space to the size k space (i.e. concatenate(p, 1 - sum(p)) ).

This approach should generalize to other transformations, such as the one for simplexes described in http://arxiv.org/abs/1301.6064 .

Sometimes its also convenient to sample in the log space and you can describe this the same way.

@jsalvatier
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants