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 use Xt_to_t1 to find the topic weight distribution for higher layers? #6

Open
bhomass opened this issue May 17, 2021 · 3 comments

Comments

@bhomass
Copy link

bhomass commented May 17, 2021

for layer 1 (bottom layer), Xt_to_t1 is

3x1 cell array
{20x9548 double}
{ 0x0 double}
{ 0x0 double}

there is no doubt how to derive the topic distribution of a single document here. But for higher layers there are multiple sets of wights. e.g. for layer 3

3x1 cell array
{20x9548 double}
{20x9548 double}
{19x9548 double}

I can't figure out how to use all three sets of weights to calculate the topic distribution. Especially when the last one is only 19 topics, instead of the 20 I specified.

Anyone figured this out?

@ethanhezhao
Copy link
Owner

Hi, Phi has three layers because T = 3. Phi{1} can be usually used. T is the number of layers of GBN. T can be set to 1 if multi-layers of topics are not needed. The model will remove inactive topics in higher layers. Thus, it may have fewer topics.

@bhomass
Copy link
Author

bhomass commented May 19, 2021

Thank you for the response. Yes, of course there are 3 Phi if T=3. But I am not looking for word distribution of topic K. I am looking for topic weights for a document j. From the code, I deduced (not 100% sure) that Xt_to_t1 represents this topic weight. Why should there be 3 sets of that, even if its for t=3.

@ethanhezhao
Copy link
Owner

This is because of the implementation of GBN. The variables in ParaGlobal{T} shall be used and others are just for internal model training. Please refer to the GBN paper and code for details.

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