TopicModel主題模型 - 主題模型可視化
來源:程序員人生 發(fā)布時(shí)間:2015-05-27 08:10:54 閱讀次數(shù):4608次
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步就不會(huì)報(bào)錯(cuò)了
Note:
1. 當(dāng)前我使用的R版本3.2.0, Rtools版本3.3會(huì)報(bào)錯(cuò),要安裝Rtools3.1!再看看官方的也是醉了!!!

[http://cran.r-project.org/bin/windows/Rtools/]
2. 注意Rtools和R版本的兼容,沒有毛病時(shí)的模樣:
> 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實(shí)現(xiàn)的topicmodel包
> install.packages("topicmodels")
Installing package into
生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對(duì)您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈(zèng)
------分隔線----------------------------
------分隔線----------------------------