lda.py @L�K�U ��K�U """ Example using GenSim's LDA and sklearn. """ import numpy as np from gensim import matutils from gensim.models.ldamodel import LdaModel from sklearn import linear_model from sklearn.datasets import fetch_20newsgroups from sklearn.feature_extraction.text import CountVectorizer def print_features(clf, vocab, n=10): """ Print sorted list of non-zero features/weights. """ coef =
![Example using GenSim's LDA and sklearn](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)