Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to infer the subject #1

Open
lhy2749 opened this issue Nov 29, 2019 · 1 comment
Open

How to infer the subject #1

lhy2749 opened this issue Nov 29, 2019 · 1 comment

Comments

@lhy2749
Copy link

lhy2749 commented Nov 29, 2019

sorry,i just read your paper.But there are so many questions,for example,after Eq.2,3,we can get the log-likelihood of a document,however,how to get the topic-word distribution and the topic-document distribution?

@yaof20
Copy link

yaof20 commented Jul 23, 2020

Hi, I was confused by this issue as well. Here is my understanding:
The optimization object of the model is to maximize the log likelihood of the whole document P(v). Once you have finished the training process, you get the weight matrix W, which is a H by K matrix (where H and K represent the numbers of topic and vocabulary respectively).

Then you could apply this W matrix to equation (1) in the iDocNADE paper which is to compute the hidden state h. To be more specific, h is an H-dimensional vector which could be interpreted as the topic distribution over the topics.

To determine the topic of a new document, you have to input the collection of document words into the model and the final hidden state can be used as the representation of the whole document. Notice that this representation is actually the H-dimensional topic distribution as mentioned above. The topic of this new document can be obtained through this topic distribution.

I hope it helps you. If there is anything wrong, please point it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants