Mixed multivariate Gauss distribution

You are right, a closer look at the model and follow the diagnostic (see our FAQ):

for var in model.basic_RVs:
    print(var.name, var.logp(model.test_point))

The obs returns inf. Then the second thing is to check the input to obs:

w.tag.test_value
np.sum(w.tag.test_value)

Turns out the weight is not summed to one. A quick workaround is to normalized the weight before input into Mixture:

    w0 =stick_breaking(beta)
    w = pm.Deterministic('w', w0/w0.sum())

Otherwise you can use Dirichlet distribution for w, which use stick-breaking internally.

1 Like