How to get a complete topic distribution for a document using gensim LDA? : <p>When I train my lda model as such</p>

<pre><code>dictionary = corpora.Dictionary(data)
corpus = [dictionary.doc2bow(doc) for doc in data]
num_cores = multiprocessing.cpu_count()
num_topics = 50
lda = LdaMulticore(corpus, num_topics=num_topics, id2word=dictionary, 
workers=num_cores, alpha=1e-5, eta=5e-1)
</code></pre>

<p>I want to get a full topic distribution for all <code>num_topics</code> for each and every document. That is, in this particular case, I want each document to have 50 topics contributing to the distribution <strong><em>and</em></strong> I want to be able to access all 50 topics' contribution. This output is what LDA should do if adhering strictly to the mathematics of LDA. However, gensim only outputs topics that exceed a certain threshold as shown <strong><a href="https://stackoverflow.com/questions/23509699/understanding-lda-transformed-corpus-in-gensim/37708396?noredirect=1#comment77429460_37708396">here</a></strong>. For example, if I try</p>

<pre><code>lda[corpus[89]]
&gt;&gt;&gt; [(2, 0.38951721864890398), (9, 0.15438596408262636), (37, 0.45607443684895665)]
</code></pre>

<p>which shows only 3 topics that contribute most to document 89. I have tried the solution in the link above, however this does not work for me. I still get the same output:</p>

<pre><code>theta, _ = lda.inference(corpus)
theta /= theta.sum(axis=1)[:, None]
</code></pre>

<p>produces the same output i.e. only 2,3 topics per document.</p>

<p>My question is how do I change this threshold so I can access the <strong><em>FULL</em></strong> topic distribution for <strong><em>each</em></strong> document? How can I access the full topic distribution, no matter how insignificant the contribution of a topic to a document? The reason I want the full distribution is so I can perform a <a href="https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence" rel="noreferrer">KL similarity</a> search between documents' distribution.</p>

<p>Thanks in advance</p>
