课程: Hands-On Natural Language Processing
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Model evaluation for topic modeling
- Model evaluation is one of the most important steps of any analytics task. Topic coherence is the quantitative measure of the quality of topics. We're going to implement the u_mass Coherence measure, which is usually set between -14 and 14. And then, the c_v measure which is usually set between zero and one. The higher the score, the higher the Coherence of the topic models. To start, we import the Coherence model from gensin.models. Then we run the Coherence and see the human Coherence score using the Latent Dirichlet model on the bag of word vectors of the 20 used data sets. The output is -2.61. Now, when we run it using the Latent Semantic Index, the score of the same data and the same vector is -4.87. Now, we can fill out the rows with empty list and save the results into a variable called texts. If we use the c_v Coherence parameter, the score for the LDA on bag of word vectors is 0.50. While using the LSI…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。