JGibbLDA使用

官方网址:

http://jgibblda.sourceforge.net/

其实也有一个GibbLDA 不过是linux下的,可能对于习惯了windows下的用户不太习惯

JGibbLDA是GIbbLDA的java版本,可以再window下使用了。

在官网上下载lda代码

根据说明准备数据的格式

在eclips中打开这个工程,之后再run configuration中写上必要的参数:

如下:

-est -alpha 0.5 -beta 0.1 -ntopics 100 -niters 1000 -savestep 100 -twords 20 -dfile models/casestudy/newdocs.dat

这条命令训练初次模型

-estc -dir models/casestudy/ -model model-01000 -niters 800 -savestep 100 -twords 30

这条在原有model上继续迭代

-inf -dir models/casestudy/ -model model-01800 -niters 30 -twords 20 -dfile newdocs.dat

这条命令对新的document进行测试

输出文件一共有这么几个:

model-XXXXX.others: 
model-XXXXX.phi
model-XXXXX.theta
model-XXXXX.tassign
model-XXXXX.twords

一般看twords和theta就可以了

twords中包含了每个topic中的words

theta中是没有document相对没有topic的概率

phi是theta的一个转置。

others是model的一些参数,如果不是仔细研究就不需要看了。


参考网页:

http://hi.baidu.com/cesul/item/ae8a3fdca2a36252d73aae73

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值