edward icon indicating copy to clipboard operation
edward copied to clipboard

Edward unsupervised.ipynb tutorial - error

Open Arvinds-ds opened this issue 9 years ago • 3 comments

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

  1. 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)]

  1. Uncommenting the code does not work with the Gibbs sampler as behavior of Mixture is different from ParamMixture

So we could remove the code or keep the corrected and commented code with proper inference for the integrated case.

Arvinds-ds avatar Sep 23 '17 19:09 Arvinds-ds

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 avatar Sep 26 '17 22:09 dustinvtran

@dustinvtran Sorry for doing this again, this should be closed.

siddharth-agrawal avatar Jan 01 '18 19:01 siddharth-agrawal

No problem. Thanks for catching these! :)

dustinvtran avatar Jan 01 '18 22:01 dustinvtran