hmm lda data requirement

本文深入探讨了LDA(Latent Dirichlet Allocation)模型的原理与实践,包括词汇向量、文档向量、主题概率矩阵等关键概念,以及如何通过Gibbs采样算法实现模型训练。同时,介绍了LDA在文本分析、信息检索和自然语言处理领域的应用案例。
  • WS a 1 x N vector where WS(k) contains the vocabulary index of the kth word token, and N is the number of word tokens. The word indices are not zero based, i.e., min( WS)=1 and max( WS ) = W = number of distinct words in vocabulary. A word index of 0 denotes the end-of-sentence marker. Note that the words are ordered according to occurence in documents.
  • DS a 1 x N vector where DS(k) contains the document index of the kth word token. The document indices are not zero based, i.e., min( DS )=1 and max( DS ) = D = number of documents
  • WO a 1 x W cell array of strings where WO{k} contains the kth vocabulary item and W is the number of distinct vocabulary items. Not needed for running the Gibbs sampler but becomes necessary when writing the resulting word-topic distributions to a file using the writetopics matlab function.

OUTPUT

  • WP a sparse matrix of size W x T, where W is the number of words in the vocabulary and T is the number of topics. WP(i,j) contains the number of times word i has been assigned to topic j.
  • DP a sparse D x T matrix, where D is the number of documents. DP(d,j) contains the number of times a word token in document d has been assigned to topic j.
  • MP a sparse W x S matrix where S is the number of HMM states. MP(i,j) contains the number of times word i has been assigned to HMM state j. Note that HMM state 1 represents the LDA model and 2..S represent the "syntactic" HMM states
  • Z a 1 x N vector containing the topic assignments where N is the number of word tokens. Z(k) contains the topic assignment for token k.
  • X a 1 x N vector containing the HMM state assignments where N is the number of word tokens. X(k) contains the assignment of the kth word token to a HMM state. Note that HMM state 1 represents the document is end, state 2 represents LDA model and 3..S+2 represent the "syntactic" HMM states
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值