Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Machine learning 如何理解Mallet中主题模型类的输出?_Machine Learning_Topic Modeling_Mallet - Fatal编程技术网

Machine learning 如何理解Mallet中主题模型类的输出?

Machine learning 如何理解Mallet中主题模型类的输出?,machine-learning,topic-modeling,mallet,Machine Learning,Topic Modeling,Mallet,在我尝试代码示例时,我真的很想理解代码输出的含义 首先,在运行过程中,它给出: Coded LDA: 10 topics, 4 topic bits, 1111 topic mask max tokens: 148 total tokens: 1333 <10> LL/token: -9,24097 <20> LL/token: -9,1026 <30> LL/token: -8,95386 <40> LL/token: -8,75353 0

在我尝试代码示例时,我真的很想理解代码输出的含义

首先,在运行过程中,它给出:

Coded LDA: 10 topics, 4 topic bits, 1111 topic mask
max tokens: 148
total tokens: 1333
<10> LL/token: -9,24097
<20> LL/token: -9,1026
<30> LL/token: -8,95386
<40> LL/token: -8,75353

0   0,5 battle union confederate tennessee american states 
1   0,5 hawes sunderland echo war paper commonwealth 
2   0,5 test including cricket australian hill career 
3   0,5 average equipartition theorem law energy system 
4   0,5 kentucky army grant gen confederates buell 
5   0,5 years yard national thylacine wilderness parks 
6   0,5 gunnhild norway life extinct gilbert thespis 
7   0,5 zinta role hindi actress film indian 
8   0,5 rings south ring dust 2 uranus 
9   0,5 tasmanian back time sullivan london century 

<50> LL/token: -8,59033
<60> LL/token: -8,63711
<70> LL/token: -8,56168
<80> LL/token: -8,57189
<90> LL/token: -8,46669

0   0,5 battle union confederate tennessee united numerous 
1   0,5 hawes sunderland echo paper commonwealth early 
2   0,5 test cricket south australian hill england 
3   0,5 average equipartition theorem law energy system 
4   0,5 kentucky army grant gen war time 
5   0,5 yard national thylacine years wilderness tasmanian 
6   0,5 including gunnhild norway life time thespis 
7   0,5 zinta role hindi actress film indian 
8   0,5 rings ring dust 2 uranus survived 
9   0,5 back london modern sullivan gilbert needham 

<100> LL/token: -8,49005
<110> LL/token: -8,57995
<120> LL/token: -8,55601
<130> LL/token: -8,50673
<140> LL/token: -8,46388

0   0,5 battle union confederate tennessee war united 
1   0,5 sunderland echo paper edward england world 
2   0,5 test cricket south australian hill record 
3   0,5 average equipartition theorem energy system kinetic 
4   0,5 hawes kentucky army gen grant confederates 
5   0,5 years yard national thylacine wilderness tasmanian 
6   0,5 gunnhild norway including king life devil 
7   0,5 zinta role hindi actress film indian 
8   0,5 rings ring dust 2 uranus number 
9   0,5 london sullivan gilbert thespis back mother 

<150> LL/token: -8,51129
<160> LL/token: -8,50269
<170> LL/token: -8,44308
<180> LL/token: -8,47441
<190> LL/token: -8,62186

0   0,5 battle union confederate grant tennessee numerous 
1   0,5 sunderland echo survived paper edward england 
2   0,5 test cricket south australian hill park 
3   0,5 average equipartition theorem energy system law 
4   0,5 hawes kentucky army gen time confederates 
5   0,5 yard national thylacine years wilderness tasmanian 
6   0,5 gunnhild including norway life king time 
7   0,5 zinta role hindi actress film indian 
8   0,5 rings ring dust 2 uranus number 
9   0,5 back london sullivan gilbert thespis 3 

<200> LL/token: -8,54771

Total time: 6 seconds
这部分的第一行可能是令牌主题分配,对吗

问题3: 第一个话题,

0   0.008   battle (8) union (7) confederate (6) grant (4) tennessee (4)   
0.008被称为“主题分布”,是该主题在整个语料库中的分布吗?然后似乎出现了冲突: 如上所示,主题0的标记将出现在copus 8+7+6+4+4+中。。。时代;相比之下,主题7有4+3+3+3+3。。。语料库中确认的时间。因此,主题7的分布应低于主题0。这是我无法理解的。 此外,最后的“0.55”是什么

非常感谢您阅读这篇长文章。希望你能回答这个问题,并希望这能对其他对Mallet感兴趣的人有所帮助


最好的

我想我知道的还不足以给出一个非常完整的答案,但这里有一个尝试。。。对于Q1,您可以检查一些以了解这些值是如何计算的。对于Q2,LL是模型的对数似然度除以令牌的总数,这是一个度量模型中给出数据的可能性的指标。增加值意味着模型正在改进。主题建模的
R
包中也提供了这些功能。Q2,是的,我认为这是第一行的正确答案。问题3,好问题,我现在还不清楚,(x)可能是某种指数,令牌频率似乎不太可能。。。据推测,其中大多数都是某种诊断

使用
bin\mallet run cc.mallet.topics.tui.TopicTrainer可获得更有用的诊断集…您的各种选项--诊断文件diagnostics.xml
,它将产生大量的主题质量度量。它们绝对值得一看


关于这一切的完整故事,我建议给普林斯顿大学的David Mimno写封电子邮件,他是MALLET的(主要?)维护者,或者通过上的列表给他写信,然后在这里为我们这些对MALLET的内部工作机制好奇的人发布答案……

对于问题3,我相信0.008(主题分布)与文档的优先\alpha主题分发相关。Mallet优化了这一点,本质上允许一些主题承载更多的“重量”。Mallet似乎估计主题0只占你语料库的一小部分

标记计数仅表示计数最高的单词。例如,主题0的剩余计数可以是0,主题9的剩余计数可以是3。因此,主题9在语料库中所占的单词比主题0多得多,尽管排名靠前的单词数量较低


最后我必须检查“0.55”的代码,但这可能是优化的\beta值(我很确定这不是不对称的)。

我理解的是:

0   0.008   battle (8) union (7) confederate (6) grant (4) tennessee (4)   
  • 0是主题编号
  • 0.008是该主题的权重
  • 战斗(8)联盟(7)[…]是此类主题的热门关键词。数字是该词在主题中的出现次数
然后,您还将获得一个.csv文件。我认为它包含了过程中最重要的数据。您将发现每行的值如下所示:

0   0   285 10   page make items thing work put dec browsers recipes expressions 
即:

  • 树级
  • 主题ID
  • 总字数
  • 文件总数
  • 前十名

  • 有点晚了,但我希望它能帮助一些人

    我听说有人在看这篇文章——我现在在康奈尔大学,而不是普林斯顿大学,我关注贴着#mallet的帖子,这比电子邮件要好得多。
    0   0   285 10   page make items thing work put dec browsers recipes expressions