LDA的訓練有兩種,一個是variational inference,一個是Gibbs抽樣。
Dirichlet先驗,反映到Gibbs抽樣方式的訓練過程上,可以認爲是給隱含主題和詞的同現計數加上一個簡單的Laplacian平滑(Laplacian平滑就是把所有值都加上一個比較小的數字然後再重新歸一化)。而GibbsSampling有一個問題,就是每次採樣都需要更新全局信息,基本沒有機會做真正意義上的並行化,只能做一個GibbsSampling的近似。
那麼若利用MapReduce實現,怎樣的近似方法好呢?
斯坦福的ScalaNLP項目值得一看:
http://nlp.stanford.edu/javanlp/scala/scaladoc/scalanlp/cluster/DistributedGibbsLDA$object.html
另外還有NIPS2007的論文:
Distributed Inference for Latent DirichletAllocation http://books.nips.cc/papers/files/nips20/NIPS2007_0672
ICML2008的論文:
Fully Distributed EM for Very Large Datasetshttp://www.cs.berkeley.edu/~jawolfe/pubs/08-icml-em