lda
lda copied to clipboard
Can't run usage/dev.py
Hi, I removed the comment before corpus.lda(100, 30, 2.5, 0.1)
in usage/dev.py
, then run it, and I got this error:
Traceback (most recent call last):
File "dev.py", line 19, in <module>
corpus.lda(100, 30, 2.5, 0.1)
File "/home/wong2/codes/bi/lda/lda.py", line 145, in lda
new_topic_index = np.random.multinomial(1, np.random.dirichlet(topic_distribution)).argmax()
File "mtrand.pyx", line 4216, in mtrand.RandomState.dirichlet (numpy/random/mtrand/mtrand.c:17783)
ZeroDivisionError: float division
To @wong2 : You may go to see my forked repo: https://github.com/hitalex/lda-with-gibbs I have done some corrections.
@hitalex Thanks, though I no longer need to play with LDA.
It is just a toy example of Gibbs sampling after all.
On Tue, Sep 11, 2012 at 9:01 PM, Wang Dàpéng [email protected]:
@hitalex https://github.com/hitalex Thanks, though I no longer need to play with LDA.
— Reply to this email directly or view it on GitHubhttps://github.com/davidmcclure/lda/issues/1#issuecomment-8458683.
Qingchao Kong (孔庆超)
Ph.D. Candidate Institute of Automation, Chinese Academy of Sciences
No. 95 Zhongguancun East Road Haidian District, Beijing 100190 China