Edward unsupervised.ipynb tutorial - error
In Edward tutorials, the Unsupervised.ipynb notebook (https://github.com/blei-lab/edward/blob/master/notebooks/unsupervised.ipynb) has the following code (commented) but I noticed errors
sigma = InverseGamma(tf.ones(D), tf.ones(D), sample_shape=K)components = [ MultivariateNormalDiag(mu[k], sigma[k], sample_shape=N) for k in range(K)]
should be
sigmasq = InverseGamma(tf.ones(D), tf.ones(D), sample_shape=K)
components = [
MultivariateNormalDiag(mu[k], tf.sqrt(sigmasq[k]), sample_shape=N)
for k in range(K)]
- Uncommenting the code does not work with the Gibbs sampler as behavior of
Mixtureis different fromParamMixture
So we could remove the code or keep the corrected and commented code with proper inference for the integrated case.
Good catch. It's useful to have in order to distinguish how you would distinguish writing a collapsed mixture of Gaussians vs a uncollapsed mixture of Gaussians in practice. Since the Gibbs sampler doesn't work for Mixture, we should add a comment about this and suggest another algorithm if you use this version.
@dustinvtran Sorry for doing this again, this should be closed.
No problem. Thanks for catching these! :)