0

I am using the topic visualization library LDAvis:

## visualization of the topics
import pyLDAvis
import pyLDAvis.gensim
pyLDAvis.enable_notebook()
pyLDAvis.gensim.prepare(ldamodel, corpus, dictionary)

which produces an image of the Principal Components of the topics unveiled by the LDA (Latent Dirichlet Allocation) model. I will like to download the image but I am stuck. Any help much appreciated it!

Economist_Ayahuasca
  • 1,648
  • 24
  • 33

1 Answers1

6

You can save the HTML file like this in Python:

vis_data = pyLDAvis.gensim.prepare(lda, corpus, dictionary)
pyLDAvis.save_html(vis_data, 'output_filename.html')

Or you can use SVG Crowbar to download the SVG node from the page it's already loaded in.

Kenneth Orton
  • 399
  • 1
  • 11