Created
August 28, 2021 13:39
-
-
Save techykajal/ecda1b5536fc6282f86c3a9da2762997 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| coherence = [] | |
| for k in range(2,25): | |
| LDA = gensim.models.ldamulticore.LdaMulticore | |
| ldamodel = LDA.load(f"ldamodel_for_{k}topics_Run_10") | |
| cm = gensim.models.coherencemodel.CoherenceModel(model=ldamodel, texts=Complete_Content, dictionary=dictionary, coherence='c_v') | |
| coherence.append((k, 'default', 'default', cm.get_coherence())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment