Topic Coherence of LDA model

Report a typo

Download the trained on tripadviser data LDA model. Unzip the folder and load the lda_model file with the LdaModel.load function.

Use the previously downloaded and used reviews dataset and its corpus we have created in the theory module. Calculate topic cohesion with the following code:

cm = CoherenceModel(model=lda_model, corpus=corpus, coherence='u_mass')

coherence = cm.get_coherence()

Write the coherence value without rounding.

Enter a number

Create a free account to access the full topic