So I am attempting to use the mixture class via:
with pm.Model() as Model:
y = theano.shared(X_)
NumberOfData = g.shape[1]
#Create a covariance matrix for each potential cluster which relates all features of our data
Lower = tt.stack([pm.LKJCholeskyCov('Sigma_{}'.format(k), n=NumberOfFeatures, eta=2.,
sd_dist=pm.HalfNormal.dist(sd = 1.)) for k in range(NumberOfClusters)])
Chol = tt.stack([pm.expand_packed_triangular(NumberOfFeatures, Lower[k]) for k in range(NumberOfClusters)])
#The center of each cluster
Mus = tt.stack([pm.Uniform('Mu_{}'.format(k), lower = 0., upper = 1., shape=NumberOfFeatures) for k in range(NumberOfClusters)])
#Create the multivariate normal distribution for each cluster
MultivariateNormals = [pm.MvNormal.dist(Mus[k], chol=Chol[k], shape = NumberOfFeatures) for k in range(NumberOfClusters)]
#Create the weights for each cluster which measures how much impact they have
Weights = pm.Dirichlet('w', np.ones(NumberOfClusters)/NumberOfClusters)
#Due to software bugs, we create a log likelihood by hand
#logpcomp = tt.stack([Dist.logp(theano.shared(y)) for Dist in MultivariateNormals], axis=1)
#Prob = pm.Deterministic("Probabilities", logpcomp)
Prob = pm.Mixture("prob", w=Weights, comp_dists=MultivariateNormals, shape = NumberOfDataPoints, observed = y)
but I am receiving
/anaconda3/lib/python3.6/site-packages/six.py in reraise(tp, value, tb)
691 if value.__traceback__ is not tb:
692 raise value.with_traceback(tb)
--> 693 raise value
694 finally:
695 value = None
ValueError: Input dimension mis-match. (input[0].shape[1] = 5, input[1].shape[1] = 1000)
where 5 is the number of clusters and 1000 is the number of data points. Thank you so much for your help!