Skip to content

Commit 5902bb6

Browse files
committed
Merge pull request piskvorky#456 from tmylk/develop
LDA: initialisation of expElogbeta fixed
2 parents 174bf3b + d5ca551 commit 5902bb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gensim/models/ldamodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def __init__(self, corpus=None, num_topics=100, id2word=None,
308308
# Initialize the variational distribution q(beta|lambda)
309309
self.state = LdaState(self.eta, (self.num_topics, self.num_terms))
310310
self.state.sstats = numpy.random.gamma(100., 1. / 100., (self.num_topics, self.num_terms))
311-
self.sync_state()
311+
self.expElogbeta = numpy.exp(dirichlet_expectation(self.state.sstats))
312312

313313
# if a training corpus was provided, start estimating the model right away
314314
if corpus is not None:

0 commit comments

Comments
 (0)