Computational Physics, Python, Linear Algebra, Svd, Code.
plt.plot(s); plt.plot(s[:10]) num_top_words=8 def show_topics(a): top_words = lambda t: [vocab[i] for i in np.argsort(t)[:-num_top_words-1:-1]] topic_words = ([top_words(t) for t in a]) return [' '.join(t) for t in topic_words] show_topics(Vh[:10]) We get topics that match the kinds of clusters we