Skip to content
Advertisement

Tag: topic-modeling

How to fix LDA model coherence score runtime Error?

text=’Alice is a student.She likes studying.Teachers are giving a lot of homewok.’ I am trying to get topics from a simple text(like above) with coherance score.This is my LDA model: When i try to run this coherance model: I am supposed to get this king of output-> Coherence Score: 0.532947587081 I get this error: raise RuntimeError(”’ RuntimeError: An attempt has

Gensim LDA Coherence Score Nan

I created a Gensim LDA Model as shown in this tutorial: https://www.machinelearningplus.com/nlp/topic-modeling-gensim-python/ And it generates 10 topics with a log_perplexity of: lda_model.log_perplexity(data_df[‘bow_corpus’]) = -5.325966117835991 But when I run the coherence model on it to calculate coherence score, like so: My LDA-Score is nan. What am I doing wrong here? Answer Solved! Coherence Model requires the original text, instead of the

Advertisement