From 72e4e2fa929c7c4fc36e81ed1b5aeec43cd2d25c Mon Sep 17 00:00:00 2001 From: Rupal Sharma <39291744+rsdel2007@users.noreply.github.com> Date: Fri, 14 Dec 2018 21:11:46 +0530 Subject: [PATCH] Update ldamodel.py --- gensim/models/ldamodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gensim/models/ldamodel.py b/gensim/models/ldamodel.py index a1de55d51b..6d5cfa209f 100755 --- a/gensim/models/ldamodel.py +++ b/gensim/models/ldamodel.py @@ -1094,7 +1094,7 @@ def bound(self, corpus, gamma=None, subsample_ratio=1.0): assert Elogthetad.dtype == self.dtype # E[log p(doc | theta, beta)] - score += np.sum(cnt * logsumexp(Elogthetad + Elogbeta[:, int(id)]) for id, cnt in doc) + score += sum(cnt * logsumexp(Elogthetad + Elogbeta[:, int(id)]) for id, cnt in doc) # E[log p(theta | alpha) - log q(theta | gamma)]; assumes alpha is a vector score += np.sum((self.alpha - gammad) * Elogthetad)