How to evaluate the best K for LDA using Mallet?

给你一囗甜甜゛ 提交于 2019-12-06 09:55:04

问题


I am using Mallet api to extract topic from twitter data and I have already extracted topics which are seems good topic. But I am facing problem to estimating K.

For example I fixed K value from 10 to 100. So, I have taken different number of topics from the data. But, now I would like to estimate which K is best. There are some algorithm I know as

  1. Perplexity
  2. Empirical likelihood
  3. Marginal likelihood (Harmonic mean method)
  4. Silhouette

I found a method model.estimate() which may be used to estimate with different value of K. But I am not getting any idea to show the value of K is best for the model. Does anyone give some idea about it with some sample code? Thanks.


回答1:


I think the best algorithm is human judgement. Create topic models with different numbers of topics and look at them and take what you like. Sometimes you want to fine tune the number of topics (Say, you don't want a certain topic to be split into two, or you want a certain topic to be there and not merged into another one).



来源:https://stackoverflow.com/questions/31729227/how-to-evaluate-the-best-k-for-lda-using-mallet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!