gpt4 book ai didi

r - 如何计算 vowpal wabbit 中 LDA 模型的对数似然

转载 作者:行者123 更新时间:2023-12-05 07:54:19 26 4
gpt4 key购买 nike

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

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

如果vowpal_wabbit's LDA中有这样的选项,我很感兴趣模型?

最佳答案

运行 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 .

关于r - 如何计算 vowpal wabbit 中 LDA 模型的对数似然,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31561067/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com