当前位置:   article > 正文

【NLP】latent Dirichlet allocation

latent dirichlet allocation

1.LDA主题模型原理

intro:

来看下面几句话:

I like to eat broccoli and bananas.
I ate a banana and spinach smoothie for breakfast.
Chinchillas and kittens are cute.
My sister adopted a kitten yesterday.
Look at this cute hamster munching on a piece of broccoli.

问:什么是latent Dirichlet allocation?
答:就是自动发现句子属于那种话题。
譬如,上面几句话分属于2种话题A&B,LDA就会这么显示:

第1、2句: 100% Topic A
第3、4句: 100% Topic B
第5句: 60% Topic A, 40% Topic B
Topic A: 30% broccoli, 15% bananas, 10% breakfast, 10% munching, … (也可以理解为A是关于食物的)
Topic B: 20% chinchillas, 20% kittens, 20% cute, 15% hamster, … (也可以理解为B是关于可爱动物的)

步骤:

假设你有一组documents,有K种话题,希望用LDA学习每个document的topic和每种topic有哪些words:

  • Go through each document, and randomly assign each word in the document to one of the K to
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/782415
推荐阅读
相关标签
  

闽ICP备14008679号