Skip to content

Instantly share code, notes, and snippets.

@mlai-demo
Created January 19, 2020 02:10
Show Gist options
  • Save mlai-demo/f4d51efcf04675c79d1fe5a7197133e9 to your computer and use it in GitHub Desktop.
Save mlai-demo/f4d51efcf04675c79d1fe5a7197133e9 to your computer and use it in GitHub Desktop.
for i in range(len(text_topic_nmf)):
top_topics = np.argsort(text_topic_nmf[i,:])[::-1][0:4]
top_topics_str = ' '.join(str(t) for t in top_topics)
print("{}: {}".format(titles[i], top_topics_str))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment