pyldavis Unable to view the graph

Deepa Huddar picture Deepa Huddar · Apr 10, 2017 · Viewed 8.3k times · Source

I am trying to visually depict my topics in python using pyldavis. However i am unable to view the graph. Is it that we have to view the graph in the browser or will it get popped upon execution. Below is my code

import pyLDAvis
import pyLDAvis.gensim as gensimvis
print('Pyldavis ....')
vis_data = gensimvis.prepare(ldamodel, doc_term_matrix, dictionary)
pyLDAvis.display(vis_data)

The program is continuously in execution mode on executing the above commands. Where should I view my graph? Or where it will be stored? Is it integrated only with the Ipython notebook?Kindly guide me through this. P.S My python version is 3.5.

Answer

cxy picture cxy · Nov 21, 2019

This not work:

pyLDAvis.display(vis_data)

This will work for you:

pyLDAvis.show(vis_data)