ajbc / lda-svi

an implementation of latent Dirichlet allocation (LDA) with stochastic variational inference
GNU General Public License v3.0
20 stars 16 forks source link

Bug? #4

Open JohnTailor opened 7 years ago

JohnTailor commented 7 years ago

Hi,

Thanks for the code, but it seems to crash :

C:\Python27\python.exe lda-svi-master/onlinewikipedia.py downloaded 0/64 articles... downloaded 8/64 articles... downloaded 16/64 articles... downloaded 24/64 articles... downloaded 32/64 articles... downloaded 40/64 articles... downloaded 48/64 articles... downloaded 56/64 articles... Traceback (most recent call last): File "lda-svi-master/onlinewikipedia.py", line 74, in main() File "lda-svi-master/onlinewikipedia.py", line 58, in main (gamma, bound) = olda.update_lambda(docset) File "lda-svi-master\onlineldavb.py", line 274, in update_lambda bound = self.approx_bound(docs, gamma) File "lda-svi-master\onlineldavb.py", line 349, in approx_bound score = score * self._D / len(docs) RuntimeWarning: invalid value encountered in double_scalars

zhanwangchen commented 6 years ago

Same here, how did you solved it?

I am using Python 2.7.12 :: Anaconda custom (64-bit)

JohnTailor commented 6 years ago

I did not solve it. In the end the Gensim library was good enough. My goal was to benchmark my own topic model with LDA ( https://github.com/JohnTailor/tkm )