Open caokai1073 opened 3 years ago
Hi, thanks for your insterest in SCALE.
gamma=q(c|x)=p(c|z), gamma is an inference function that inferences the cluster (c) from the original data (x). However, the inference for c in the model is from the latent (z), because only z is connected with c in the model (x->z->c), thus, we replace q(c|x) with p(c|z), this can be also regarded as an approximation.
q(z, c|x) = q(c|x) * q(z|x), this is because c and z can be both directly inferenced from x in their actual relationship (z<-x->c, different from the modeled relationship in the SCALE, x->z->c), thus c and z are independent condition on the observed x.
I hope these could answer your question.
Thanks for your reply! But I am still a little confused. For example,
# log p(c)
logpc = torch.sum(gamma*torch.log(pi), 1)
I think it should be
Eq(z,c|x)[log p(c)] = \int q(z,c|x) log p(c) dx
Why you used gamma
instead of q(z,c|x)
in this calculation?
Hi, SCALE is a very interesting and useful tool.
But I have a question about the calculation of ELBO.
Why gamma=q(c|x)=p(c|z) is used to calculate ELBO instead of q(z,c|x)? Does
q(c|x)
equals toq(z,c|x)
inEq(z,c|x)[log p(x|z) + log p(z|c) + log p(c) - log q(z|x) - log q(c|x)]
in loss.py?Thanks!