LDAvis is designed to help users interpret the topics in a topic
model that has been fit to a corpus of text data. The package
extracts information from a fitted LDA topic model to inform an
interactive web-based visualization.

Of course, we can also get the topic distribution for each document
(commonly called \(\Theta\)).

pd.Series(kos_state.topic_distribution_by_document()[0]).plot(kind='bar').set_title('Topic distribution for first document')plt.xticks(pred.index,['%d'%(d+1)fordinxrange(len(pred.index))])plt.xlabel('Topic Number')plt.ylabel('Probability of Each Topic')

We can also get the raw word distribution for each topic (commonly
called \(\Phi\)). This is related to the word relevance. Here are
the most common words in one of the topics.