程序员人生 网站导航

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

栏目:服务器时间:2015-05-27 08:10:54

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
------分隔线----------------------------
------分隔线----------------------------

最新技术推荐