【问题标题】:How to compute the log-likelihood of the LDA model in vowpal wabbit如何在 vowpal wabbit 中计算 LDA 模型的对数似然
【发布时间】:2015-10-12 04:57:30
【问题描述】:

我是典型的、普通的、日常的 R 用户。在 R 中,lda 包中的 lda.collapsed.gibbs.sampler 非常有用,它使用折叠的 Gibbs 采样器来拟合潜在 Dirichlet 分配 (LDA) 模型,并使用 Gibbs 采样最后一次迭代中的状态返回潜在参数的点估计。

这个函数还有一个很好的参数compute.log.likelihood,当设置为TRUE时,将导致采样器计算日志 每次扫描后单词的可能性(在一个常数因子内) 变量。 这对于评估收敛性和比较不同的 LDA 模型(针对不同数量的主题计算)很有用。

我对@9​​87654322@ 模型中是否有这样的选项感兴趣?

【问题讨论】:

    标签: r lda vowpalwabbit


    【解决方案1】:

    运行vw -h --lda 1 时,帮助提供以下参数。 metrics 参数默认关闭。 它用于计算实现here 的主题连贯性。 尝试通过 --metrics 1 启用此功能

    Latent Dirichlet Allocation:
      --lda arg                             Run lda with <int> topics
    
      --lda_alpha arg (=0.100000001)        Prior on sparsity of per-document topic
                                            weights
      --lda_rho arg (=0.100000001)          Prior on sparsity of topic 
                                            distributions
      --lda_D arg (=10000)                  Number of documents
      --lda_epsilon arg (=0.00100000005)    Loop convergence threshold
      --minibatch arg (=1)                  Minibatch size, for LDA
      --math-mode arg (=0)                  Math mode: simd, accuracy, fast-approx
      --metrics arg (=0)                    Compute metrics
    

    或者直接跳转到source code of vw utility

    可以在here 找到一个展示大多数参数的有用演示文稿。

    【讨论】:

      猜你喜欢
      • 2015-03-29
      • 2015-10-12
      • 1970-01-01
      • 1970-01-01
      • 2014-08-07
      • 2014-11-23
      • 2016-08-22
      • 1970-01-01
      • 2015-06-20
      相关资源
      最近更新 更多