Code for variational inference in a dirichlet process mixture of exponential families model.
See U{http://www.cs.berkeley.edu/~jordan/papers/vdp-icml.pdf}.
Bases: object
The variational distribution, q, over the hidden variables.
The truncation parameter: I.e. upper limit on # of mixtures
The number of data
The data
The dirichlet scaling parameter
@return: An array specifying the probability for a new point coming from each component.
Conjugate prior to the exponential family that we are mixing
The number of dimensions in the conjugate prior that represent the strength of the prior
Beta parameters for the distributions on V_i
Returns the likelihood given the variational distribution. Eqn. 12 in U{http://www.cs.berkeley.edu/~jordan/papers/vdp-icml.pdf}.
Multinomial parameters for distributions on Z_n
Natural parameters for distributions on eta_i
Generate N data points using given parameters.
@return: (counts, eta, X)
Draw N times from a Polya urn parameterised by alpha.
@arg N: Number of draws to make. @arg alpha: Parameter for the polya urn. Small alphas result in a small number of components, big alphas spread the draws over more components. @return: A vector of counts. The i’th entry represents how many draws were made from the i’th component