国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > 服务器 > TopicModel主题模型 - 主题模型可视化

TopicModel主题模型 - 主题模型可视化

来源:程序员人生   发布时间:2015-05-27 08:10:54 阅读次数:4372次

http://blog.csdn.net/pipisorry

Browse LDA Topic Models

This package allows you to create a set of HTML files to browse a topic model.It creates a word cloud and time-graph per topic, and annotates a selection of documents with the topic for each word.
Installing 安装

R命令行中输入:

if (!require(devtools)) {install.packages("devtools"); library(devtools)}
install_github("vanatteveldt/topicbrowser")
library(topicbrowser)
第1步提示要安装Rtools : Loading required package: devtools WARNING: Rtools is required to build R packages, but is not currently installed. Please download and install Rtools 3.1 from http://cran.r-project.org/bin/windows/Rtools/, then run
> find_rtools()
[1] TRUE
...
安装完成后第1步就不会报错了

Note:

1. 当前我使用的R版本3.2.0, Rtools版本3.3会报错,要安装Rtools3.1!再看看官方的也是醉了!!!

[http://cran.r-project.org/bin/windows/Rtools/]

2. 注意Rtools和R版本的兼容,没有毛病时的模样:

> if (!require(devtools)) {install.packages("devtools"); library(devtools)} > install_github("vanatteveldt/topicbrowser") Downloading github repo vanatteveldt/topicbrowser@master Installing topicbrowser "C:/PROGRA~1/R/R⑶2~1.0/bin/x64/R" --vanilla CMD INSTALL "C:/Users/pi/AppData/Local/Temp/RtmpcvsU6M/devtools11d0fc638d5/vanatteveldt-topicbrowser-cfa62a3" --library="C:/Users/pi/Documents/R/win-library/3.2" --install-tests * installing *source* package 'topicbrowser' ... ** R ** data ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (topicbrowser) Reloading installed topicbrowser > library(topicbrowser) >

Creating a topic browser

1. 先要安装R实现的topicmodel包

> install.packages("topicmodels") Installing package into
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生