找回密码
 注册
查看: 410|回复: 0

R语言 VBLPCM包 VBLPCM-package()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 14:31:38 | 显示全部楼层 |阅读模式
VBLPCM-package(VBLPCM)
VBLPCM-package()所属R语言包:VBLPCM

                                        VBLPCM: Variational Bayes for the Latent Position Cluster Model for networks
                                         VBLPCM变分贝叶斯网络模型的潜在位置聚类

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

A faster approximate alternative to using latentnet. Interfaces C code to fit a Variational Bayes approximation to the posterior for the Latent Position Cluster Model for networks.
更快的近似替代使用latentnet。接口C代码,以适应变分贝叶斯近似后的潜在位置的聚类网络模型。


Details

详细信息----------Details----------

This package is designed to be used as an alternative to the latentnet package when network size computationally prohibits latentnet. It uses a Variational Bayesian Expectation Maximisation algorithm to compute a closed-form approximation to the posterior that the ergmm function in latentnet samples from. It may be thought of as an intermediary approximation that is more accurate than the two-stage MLE fit provided by latentnet but a faster approximation to the MCMC sampler provided by latentnet. In fact, the VB iterations also converge quicker than the two-stage MLE.
这个软件包设计用来作为一种替代的latentnet包网络规模时计算禁止latentnet的。它采用了变分贝叶斯的期望Maximisation算法计算封闭形式近似的后,ergmm的功能在latentnet样品。它可被认为是更准确的比的两阶段的最大似然估计适合提供latentnet但更快的近似的MCMC采样所提供latentnet作为媒介近似。事实上,VB的迭代收敛速度比的两阶段的最大似然估计。

VBLPCM can also take advantage of the stratified sampler of Adrian Raftery, Xiaoyue Niu, Peter Hoff and Ka Yee Yeung. This approximation to the (log)likelihood allows for even larger networks to be analysed (see tech report below). Rather than using a fixed number of "controls" per geodesic distance we set a probability of sampling each non-link at each level.
,VBLPCM还可以利用阿德里安·拉夫特里牛,小月,彼得·霍夫和杨加怡的分层采样。这种近似(log)可能允许更大的网络进行分析(参见技术报告)。而不是使用一个固定数量的每测地距离的“控制”,我们设置采样在每一级的每个非链路的概率。

We also provide four choices of model; these are "plain" and three with random node-specific social effects.  "rsender" for sender random effects, "rreceiver" for receiver random effects and "rsocial" for both.  For undirected networks only "plain" or "rsocial" may be chosen.
我们还提供了四种选择的模式,这些都是“普通”和3个随机节点特定的社会效果。的“rsender”发送者随机效应,接收器随机效果和“rsocial的”为的“rreceiver”。对于无向网络中唯一的“纯”或“rsocial”可以选择。


参考文献----------References----------

"Variational Bayesian Inference for the Latent Position Cluster Model." Workshop on Analyzing Networks and Learning with Graphs.  Neural Information Processing Systems.
"Fitting Latent Cluster Models for Social Networks with latentnet." Journal of Statistical Software, number 5, volume 24, pages 1-23.
"Model-Based Clustering for Social Networks."   Journal of the Royal Statistical Society: Series A (Statistics in Society), 170(2), 301-354.
"Fast Inference for the Latent Space Network Model Using a Case-Control Approximate Likelihood." University of Washington, Department of Statistics, Technical Report 572.
"The Evolving Social Geography of Blogs" Societies and Cities in the Age of Instant Access Berlin:Springer, 275–294

参见----------See Also----------

vblpcmstart vblpcmfit
vblpcmstartvblpcmfit


实例----------Examples----------


### simulated data example with missing edges ###[##模拟数据的例子,缺边###]
data(simulated.network,package="VBLPCM")
g<-network(Y, directed=FALSE)
v.start<-vblpcmstart(g,G=3)
v.fit<-vblpcmfit(v.start)
### plot the mean posterior positions ###[##图的平均后的位置###]
plot(v.fit, main="simulated network with missing edges: VB Solution")
### Use ROC / AUC to get a measure of model fit to the data ###[##使用ROC / AUC得到的数据衡量模型的拟合###]
vblpcmroc(v.fit)

### Sampson's monks ###[##桑普森的僧侣###]
data(sampson,package="VBLPCM")
v.start<-vblpcmstart(samplike,G=3)
v.fit<-vblpcmfit(v.start)
### plot the mean posterior positions ###[##图的平均后的位置###]
plot(v.fit, main="Sampson's Monks: VB Solution")
### Who's in each group?  ###[##各组吗? ###]
vblpcmgroups(v.fit)
### Use ROC / AUC to get a measure of model fit to the data ###[##使用ROC / AUC得到的数据衡量模型的拟合###]
vblpcmroc(v.fit)

### create a matrix of link posterior probabilities given the fitted model ###[##创建一个链接后验概率矩阵拟合模型###]
probs<-predict.vblpcm(v.fit)
### create a boxplot goodness-of-fit graphic ###[##创建一个盒形图的善良适合图形###]
boxplot(split(probs,as.sociomatrix(samplike)))

### Sampson's monks with sender random effects ###[##桑普森的僧侣与发送者随机效应###]
data(sampson,package="VBLPCM")
v.start<-vblpcmstart(samplike,G=3,model="rreceiver")
v.fit<-vblpcmfit(v.start)
### plot the mean posterior positions ###[##图的平均后的位置###]
plot(v.fit, R2=0.1,main="Sampson's Monks: VB with Receiver Random Effects")

### Use ROC / AUC to get a measure of model fit to the data ###[##使用ROC / AUC得到的数据衡量模型的拟合###]
vblpcmroc(v.fit)
### Look at gof plots ###[#####看看GOF图]
plot(gof(v.fit))

### find the most probable link that does not in fact occur ###[##最有可能的链接,其实并不发生###]
monks<-network.vertex.names(samplike)
# save adjacency matrix to Y[保存邻接矩阵为Y]
Y<-as.sociomatrix(samplike)
probs<-predict.vblpcm(v.fit)
expand.grid(monks,monks)[Y==0,][order(probs[Y==0],decreasing=TRUE),][1,]
### this is a self link; let's find the most probable non-link that's not a self link ###[##这是一种自我的联系,让我们找到最有可能的非链接,这不是一个自我的链接###]
diag(Y)<-NaN
expand.grid(monks,monks)[Y==0,][order(probs[Y==0],decreasing=TRUE),][1,]

### find the least probable link that does in fact occur ###[至少可能链接,并在实际发生的#####找到]
expand.grid(monks,monks)[Y==1,][order(probs[Y==1]),][1,]

### run a bigger example, using the likelihood sampler set to 0.1 ###[##运行一个更大的例子,使用的可能性采样设置为0.1###]
data(aids,package="VBLPCM")
v.start<-vblpcmstart(aids.net,G=7,model="rsender",LSTEPS=5e2)
v.fit<-vblpcmfit(v.start, STRAT=0.1,STEPS=20)
### plot the mean posterior positions ###[##图的平均后的位置###]
plot(v.fit, R2=0.1,main="Aids Blogs with Sender Random Effects")

### Use ROC / AUC to get a measure of model fit to the data ###[##使用ROC / AUC得到的数据衡量模型的拟合###]
vblpcmroc(v.fit)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-27 14:49 , Processed in 0.023148 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表