Skip to content

Instantly share code, notes, and snippets.

@techykajal
Created August 28, 2021 13:41
Show Gist options
  • Select an option

  • Save techykajal/44c6abe6e2076e69dc82a8cb23c01490 to your computer and use it in GitHub Desktop.

Select an option

Save techykajal/44c6abe6e2076e69dc82a8cb23c01490 to your computer and use it in GitHub Desktop.
# Show graph
x = range(2,25)
plt.plot(x, mat['coherence_score'])
plt.xlabel("Num Topics")
plt.ylabel("Coherence score")
plt.legend(("coherence_values"), loc='best')
plt.show() # Num Topics = 4 is having highest coherence score.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment