【NLP】latent Dirichlet allocation

latent Dirichlet allocation(LDA)是一种主题模型,用于发现文本数据中的隐藏主题。通过随机分配和迭代优化,LDA能够确定每个文档的主题分布和每个主题的词项分布,最终生成高质量的主题特征。
摘要由CSDN通过智能技术生成

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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值