The Infinite Gaussian Mixture Model


#1

how to build Infinite Gaussian Mixture Model by PYMC3.
As described by Carl Edward RasmussenInfinite Gaussian Mixture Model


#2

You cannot, but a work around is to build (truncated) Dirichlet process mixture model.


#3

Does this mean that the number of components is fixed or only less than a given K value?


#4

The number of components is fixed, it should be a large number. In density estimation you get a few components with large weights but the rest of the components have negligible weights, but I am not sure how it would look like in your application.

Note that inferencing mixture (infinite or not) is really tricky.


#5

Thank a lot! I am new for pymc3.
In the official documentation, I found that the data is one-dimensional. If I want to fit high-dimensional data, what should I do?

just like this:

with pm.Model() as model:
alpha = pm.Gamma(‘alpha’, 1., 1.)
beta = pm.Beta(‘beta’, 1., alpha, shape=K)
w = pm.Deterministic(‘w’, stick_breaking(beta))

tau = pm.Gamma('tau', 1., 1., shape=K)
lambda_ = pm.Uniform('lambda', 0, 5, shape=K)
mu = pm.Normal('mu', 0, tau=lambda_ * tau, shape=K)
obs = pm.NormalMixture('obs', w, mu, tau=lambda_ * tau,
                       observed=old_faithful_df.std_waiting.values)

Can I set shape=(k, D)?
Where D is the dimension of data.