With PyMC3, Categorical
Distribution can be used as index.
(see https://stats.stackexchange.com/questions/185812/regression-mixture-in-pymc3)
But with Edward, slice or tf.gather
do not work for ed.Gibbs
.
On the other hand, if I use ed.MetropolisHastings
, it works. (I reached this method thanks to this post)
But because acceptance rate is very small (less than 0.1), it looks not converge.