nateraw / Lda2vec-Tensorflow

Tensorflow 1.5 implementation of Chris Moody's Lda2vec, adapted from @meereeum
MIT License
107 stars 40 forks source link

Issue in pyLDAvis run #26

Closed amitbikram2913 closed 5 years ago

amitbikram2913 commented 5 years ago

Am getting an error while running the run_20newsgroups.py file. The problem seems to be coming from the prepare function of pyLDAvis which seems to be not getting the correct input variables. Could anyone please help with this?

File "run_20newsgroups.py", line 35, in utils.generate_ldavis_data(data_path, m, idx_to_word, freqs, vocab_size) File "/home/amit/intent/lib/python3.5/site-packages/lda2vec-0.15.0-py3.5.egg/lda2vec/utils.py", line 174, in generate_ldavis_data File "/home/amit/intent/lib/python3.5/site-packages/pyLDAvis/_prepare.py", line 374, in prepare _input_validate(topic_term_dists, doc_topic_dists, doc_lengths, vocab, term_frequency) File "/home/amit/intent/lib/python3.5/site-packages/pyLDAvis/_prepare.py", line 65, in _input_validate raise ValidationError('\n' + '\n'.join([' * ' + s for s in res])) pyLDAvis._prepare.ValidationError:

nateraw commented 5 years ago

Thank you for pointing this out! I removed one of the parameters in that function. The call should be this:

utils.generate_ldavis_data(data_path, m, idx_to_word, freqs, vocab_size)

Will push a fix tomorrow!