11

I have a LDA model with the 10 most common topics in 10K documents. Now it's just an overview of the words with corresponding probability distribution for each topic.

I was wondering if there is something available for python to visualize these topics?

SVK
  • 1,004
  • 11
  • 25
mvh
  • 189
  • 1
  • 2
  • 20

5 Answers5

6

pyLDAvis looks reasonably good.

There's also Termite developed by Jason Chuang of Stanford.

drevicko
  • 14,382
  • 15
  • 75
  • 97
  • @user3050590 are you sure? It's a port of the R package with the same name which appears to be written in R itself, so should be platform independent. Do you have R installed? Do you have pyLDAvis installed in R? Without those it won't work.. – drevicko Jun 30 '17 at 08:59
  • the problem was with windows installation for scipy package which was not allowing the pyLDAvis to install.. – user3050590 Aug 10 '17 at 10:25
  • @user3050590 I'd recommend using anaconda python, scipy problems ought to be solved there (: – drevicko Aug 10 '17 at 12:11
4

There some visulizations you can choise.

In the topic of Visualizing topic models, the visualization could be implemented with,

In this topic Visualizing Topic Models, the visualization could be implemented with

  • Matplotlib
  • Bokeh
  • etc.
Lu Ming
  • 632
  • 4
  • 20
3

PyLDAVis - Visualization tool for LDA Models

Useful article for learning Topic Modelling using different models in Python

ThReSholD
  • 668
  • 10
  • 15
  • Answers that are basically just external links will not age well. Can you provide some relevant details here in order to make the answer stand-alone? –  Nov 21 '17 at 21:28
2

Word clouds are popular ways of visualizing topic distributions. To generate a word cloud in python consider cloning the wordcloud library.

Vadim Smolyakov
  • 1,187
  • 11
  • 24
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/12061149) – Aurelius Apr 19 '16 at 22:10
  • removed reference to links – Vadim Smolyakov Apr 20 '16 at 00:10
2

Depending upon the use case, you may chose some of these Visualizations as well.

1)Stacked Bar Chart

2)Heatmap

3)Table (https://de.dariah.eu/tatom/topic_model_visualization.html)

4)Histogram

5)Violin Plot (https://www.analyticsvidhya.com/blog/2015/05/data-visualization-python/)

Most of these visualizations are possible thorough Matplotlib library in Python.

SVK
  • 1,004
  • 11
  • 25