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

R语言 sna包 rgws()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 11:01:32 | 显示全部楼层 |阅读模式
rgws(sna)
rgws()所属R语言包:sna

                                         Draw From the Watts-Strogatz Rewiring Model
                                         绘制从的瓦斯托加茨重新布线型号

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

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

rgws generates draws from the Watts-Strogatz rewired lattice model.  Given a set of input graphs, rewire.ws performs a (dyadic) rewiring of those graphs.
rgws产生从的Watts-斯托加茨的重新布线的点阵模型的绘制。给定一组的输入图形,rewire.ws执行(并矢)重新布线这些图表。


用法----------Usage----------


rgws(n, nv, d, z, p, return.as.edgelist = FALSE)
rewire.ud(g, p, return.as.edgelist = FALSE)
rewire.ws(g, p, return.as.edgelist = FALSE)



参数----------Arguments----------

参数:n
the number of draws to take.
数即将采取。


参数:nv
the number of vertices per lattice dimension.
每晶格尺寸的顶点的数量。


参数:d
the dimensionality of the underlying lattice.
维底层晶格。


参数:z
the nearest-neighbor threshold for local ties.
最近邻阈值,为地方的关系。


参数:p
the dyadic rewiring probability.
二进重新布线的概率。


参数:g
a graph or graph stack.
图形或图形堆栈。


参数:return.as.edgelist
logical; should the resulting graphs be returned in edgelist form?
逻辑,生成的图表在EdgeList,在该列表的形式返回?


Details

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

A Watts-Strogatz graph process generates a random graph via the following procedure.  First, a d-dimensional uniform lattice is generated, here with nv vertices per dimension (i.e., nv^d vertices total).  Next, all z neighbors are connected, based on geodesics of the underlying lattice.  Finally, each non-null dyad in the resulting augmented lattice is "rewired" with probability p, where the rewiring operation exchanges the initial dyad state with the state of a uniformly selected null dyad sharing exactly one endpoint with the original dyad.  (In the standard case, this is equivalent to choosing an endpoint of the dyad at random, and then transferring the dyadic edges to/from that endpoint to another randomly chosen vertex.  Hence the "rewiring" metaphor.)  For p==0, the W-S process generates (deterministic) uniform lattices, approximating a uniform G(N,M) process as p approaches 1.  Thus, p can be used to tune overall entropy of the process.  A well-known property of the W-S process is that (for large nv^d and small p) it generates draws with short expected mean geodesic distances (approaching those found in uniform graphs) while maintaining high levels of local "clustering" (i.e., transitivity).  It has thus been proposed as one potential mechanism for obtaining "small world" structures.
瓦特,斯托加茨的图形化过程通过以下步骤生成一个随机的图形。首先,产生一个d维均匀晶格,在这里,与nv每个维度的顶点(即,nv^d顶点总)。接下来,所有z的邻居连接,基于测地线的基础晶格。最后,每个非空对子,在得到增强格“重新布线”的概率p,重新布线操作交流的初始的对子状态与均匀的空的状态对子共用一个端点与原来的二分体。 (在标准情况下,这是相当于选择的端点的对子随机,然后转移到/从该端点到另一个随机选择的顶点的二进边缘,因此“重新布线”比喻。)对于p==0 WS过程中产生(确定性)统一格,近似一个统一的G(N,M)p接近1。因此,p可以用于调谐的过程的总熵。的WS过程中是一个众所周知的财产(例如大nv^d小p)产生抽奖,短料的地方,同时保持较高的水平,意味着测量距离(接近那些在统一的图形) “聚类”(即传递性)。因此,它被提议作为一个潜在的机制,获得“小世界”的结构。

rgws produces independent draws from the above process, returning them as an adjacency matrix (if n==1) or array (otherwise).  rewire.ws, on the other hand, applies the rewiring phase of the W-S process to one or more input graphs.  This can be used to explore local perturbations of the original graphs, conditioning on the dyad census.  rewire.ud is similar to rewire.ws, save in that all dyads are eligible for rewiring (not just non-null dyads), and exchanges with non-null dyads are permitted.  This process may be easier to work with than standard W-S rewiring in some cases.
rgws从上述过程产生独立的绘制,返回邻接矩阵(如果n==1)或阵列(否则)。 rewire.ws,在另一方面,适用的WS过程重装相的一个或多个输入图表。这可以被用来探索当地的原始图形,空调的对子普查扰动。 rewire.ud是rewire.ws的,保存在所有的二元关系重新布线(不只是非空的二元关系),和非空二元关系的交流,允许有资格的。这个过程可能是更容易的工作,重新布线在某些情况下比标准的WS。


值----------Value----------

A graph or graph stack containing draws from the appropriate W-S process.
一个图形或图形堆栈,其中包含吸引了来自适当的WS过程。


警告----------Warning ----------

Remember that the total number of vertices in the graph is nv^d.  This can get out of hand very quickly.
请注意,图中的顶点总数为nv^d。这可以让手非常快。


注意----------Note----------

rgws generates non-toroidal lattices; some published work in this area utilizes underlying toroids, so users should check for this prior to comparing simulations against published results.
rgws产生非环形格,一些已经发表的作品在这方面利用底层的环形,因此,用户应该检查此之前,模拟对已公布业绩比较。


(作者)----------Author(s)----------


Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>



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

Watts, D. and Strogatz, S. (1998).  &ldquo;Collective Dynamics of Small-world Networks.&rdquo;  Nature, 393:440-442.

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

rgnm, rgraph
rgnm,rgraph


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



#Generate Watts-Strogatz graphs, w/increasing levels of rewiring[生成瓦的斯托加茨图,W /水平的不断提高重新布线]
gplot(rgws(1,100,1,2,0))     #No rewiring[无需重新布线]
gplot(rgws(1,100,1,2,0.01))  #1% rewiring[1%,重新布线]
gplot(rgws(1,100,1,2,0.05))  #5% rewiring[5%重新布线]
gplot(rgws(1,100,1,2,0.1))   #10% rewiring[10%重新布线]
gplot(rgws(1,100,1,2,1))     #100% rewiring [100%重新布线]

#Start with a simple graph, then rewire it[开始用一个简单的图形,然后重新连接]
g<-matrix(0,50,50)
g[1,]&lt;-1; g[,1]&lt;-1    #Create a star[创建一个明星]
gplot(g)
gplot(rewire.ws(g,0.05))  #5% rewiring[5%重新布线]


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-8 06:13 , Processed in 0.024955 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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