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:
Length of doc_lengths not equal to the number of rows in doc_topic_dists; both should be equal to the number of documents in the data.
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: