主题模型LDA 七月算法 邹博 2015年5月9日 2/33 julyedu.com 主要内容和目标 共轭先验分布 Dirichlet分布 unigram model LDA Gibbs采样算法 3/33 julyedu.com 共轭先验分布 在贝叶斯概率理论中,如果后验概率P(θ|x)和先验 概率p(θ)满足同样的分布律,那么,先验分布和后 验分布被叫做共轭分布,同时,先验分布叫做似然 函数的共轭先验分布。 In Bayesian probability theory, if the posterior distributions p(θ|x) are in the same family as the prior probability distribution p(θ), the prior and posterior are then called conjugate distributions, and the prior is called a conjugate prior for the likelihood function. 4/33 julyedu.com 共轭先验分布的提出 某观测数据服从概率分布P(θ)时, 当观测到新的X数据时,有如下问题: 可否根据新观测数据X,更新参数θ 根据新观测数据可以在多大程度上改变参数θ θθ+ Δθ 当重新估计θ的时候,给出新参数值θ的新概 率分布。即:P(θ|x) 5/33 julyedu.com 分析 根据贝叶斯法则 P(x|θ)表示以预估θ为参数的x概率分布, 可以直接求得。P(θ)是已有原始的θ概率分 布。 方案:选取P(x|θ)的共轭先验作为P(θ)的分 布,这样,P(x|θ)乘以P(θ)然后归一化结果 后其形式和P(θ)的形式一样。 PxP xP PxP xP 6/33 julyedu.com 举例说明 投掷一个非均匀硬币,可以使用参数为θ的 伯努利模型,θ为硬币为正面的概率,那么 结果x的分布形式为: 其共轭先验为beta分布,具有两个参数α