Dirichlet Distribution in PyMC

1k Views Asked by At

Can someone please explain working with a Dirichlet distribution in PyMC (with a working example) ?

I realize it is trivial but I am not able to find trace of all the components. Is there any way out ?

I have already posted the relevant part of my code here

KeyError while printing trace in PyMC

1

There are 1 best solutions below

0
On

Maybe what bothers you is that when you define a k-component Dirichlet distribution, pymc only gives k-1 components. The remaining component is assumed to be 1 minus the sum of all the components. See here.

By the way, this behaviour has changed in pymc3, and it returns the k components (which obviously add to 1).