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

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

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

                                         Estimate the Structural Distance Matrix for a Graph Stack
                                         估计结构的距离矩阵图形堆栈

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

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

Estimates the structural distances among all elements of dat using the method specified in method.
估计的所有元素dat使用指定的方法在method结构之间的距离。


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


sdmat(dat, normalize=FALSE, diag=FALSE, mode="digraph",
    output="matrix", method="mc", exchange.list=NULL, ...)



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

参数:dat
graph set to be analyzed.  
图形设置,以进行分析。


参数:normalize
divide by the number of available dyads?
可用的二价基的数目除以?


参数:diag
boolean indicating whether or not the diagonal should be treated as valid data.  Set this true if and only if the data can contain loops.  diag is FALSE by default.
布尔值,表示是否对角线应被视为有效的数据。设置这是真的,当且仅当数据可以包含循环。 diag是FALSE默认情况下。


参数:mode
string indicating the type of graph being evaluated.  "digraph" indicates that edges should be interpreted as directed; "graph" indicates that edges are undirected.  mode is set to "digraph" by default.
的图表类型的字符串,表示正在评估中。 "digraph"表示的边缘应被解释为指示;"graph"表明边缘是无向的。 mode默认情况下被设置成"digraph"。


参数:output
"matrix" for matrix output, "dist" for a dist object.
"matrix"矩阵输出,"dist"一个dist对象。


参数:method
method to be used to search the space of accessible permutations; must be one of "none", "exhaustive", "anneal", "hillclimb", or "mc".
方法被用于搜索空间的访问排列;必须的"none","exhaustive","anneal","hillclimb"或"mc"。


参数:exchange.list
information on which vertices are exchangeable (see below); this must be a single number, a vector of length n, or a nx2 matrix.
顶点的信息交换(见下文),这必须是一个数字,长度为n的向量,或×2矩阵。


参数:...
additional arguments to lab.optimize.
附加参数到lab.optimize。


Details

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

The structural distance between two graphs G and H is defined as
两个图G和H的结构之间的距离被定义为

d_S(G,H | L_G,L_H) = min_[L_G,L_H] d(l(G),l(H))</i>
D_S(G,H L_G,L_H)= min_ [L_G,L_H] D(L(G),L(H))</ P>

The accessible permutation set is determined by the exchange.list argument, which is dealt with in the following manner. First, exchange.list is expanded to fill an nx2 matrix.  If exchange.list is a single number, this is trivially accomplished by replication; if exchange.list is a vector of length n, the matrix is formed by cbinding two copies together.  If exchange.list is already an nx2 matrix, it is left as-is.  Once the nx2 exchangeabiliy matrix has been formed, it is interpreted as follows: columns refer to graphs 1 and 2, respectively; rows refer to their corresponding vertices in the original adjacency matrices; and vertices are taken to be theoretically exchangeable iff their corresponding exchangeability matrix values are identical.  To obtain an unlabeled distance (the default), then, one could simply let exchange.list equal any single number.  To obtain the Hamming distance, one would use the vector 1:n.
访问置换集的exchange.list的说法,这是通过以下方式处理决定。首先,exchange.list扩大,以填补×2矩阵。 exchange.list如果是单数,这是平凡通过复制,如果exchange.list是一个长度为n的向量,矩阵所形成的cbinding两个副本。如果exchange.list已经的NX2矩阵,它保持原样。一旦的NX2 exchangeabiliy矩阵已经形成,它被解释如下:列请参阅图1和2中,分别;行指他们在原来的邻接矩阵的相应的顶点和顶点采取理论上可交换的,当且仅当其对应的可交换矩阵值是相同的。为了获得一个未标记的距离(默认值),然后,可以简单地让exchange.list等于任何单一的数字。得到的海明距离,将使用向量1:n。

Because the set of accessible permutations is, in general, very large (o(n!)), searching the set for the minimum distance is a non-trivial affair.  Currently supported methods for estimating the structural distance are hill climbing, simulated annealing, blind monte carlo search, or exhaustive search (it is also possible to turn off searching entirely).  Exhaustive search is not recommended for graphs larger than size 8 or so, and even this may take days; still, this is a valid alternative for small graphs.  Blind monte carlo search and hill climbing tend to be suboptimal for this problem and are not, in general recommended, but they are available if desired.  The preferred (and default) option for permutation search is simulated annealing, which seems to work well on this problem (though some tinkering with the annealing parameters may be needed in order to get optimal performance).  See the help for lab.optimize for more information regarding these options.
由于组可访问的排列,在一般情况下,是非常大的(o(n!)),搜索的组的最小距离是一个非平凡的事情。目前支持的方法估计的结构距离的爬山算法,模拟退火算法,瞎蒙地卡罗搜索,或穷举搜索(它也可以搜索完全关闭)。穷举搜索,不建议大小为8或大于图表,即使这可能需要数天,还是小图,这是一种有效的替代。盲蒙地卡罗搜索和爬山对于这个问题往往是不理想的,都没有,一般建议,但如果需要的话,他们是可以的。排列搜索是首选(默认)选项模拟退火算法,在这个问题上似乎工作得很好(虽然可能需要一些修修补补的退火工艺参数,以获得最佳性能)。 lab.optimize有关这些选项的更多信息,请参阅帮助。

Structural distance matrices may be used in the same manner as any other distance matrices (e.g., with multidimensional scaling, cluster analysis, etc.)  Classical null hypothesis tests should not be employed with structural distances, and QAP tests are almost never appropriate (save in the uniquely labeled case).  See cugtest for a more reasonable alternative.
结构的距离矩阵可以被用在任何其他距离矩阵相同的方式(例如,多维标度,聚类分析等)古典零假设测试不应该与结构的距离,几乎从来没有适当的QAP测试(保存在独特标记的情况下)。见cugtest一个更合理的替代方案。


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

A matrix of distances (or an object of class dist)
矩阵的距离(或一个类的对象dist)


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

The search process can be very slow, particularly for large graphs.  In particular, the exhaustive method is order factorial, and will take approximately forever for unlabeled graphs of size greater than about 7-9.
搜索过程可能会很慢,尤其是对于大型的图形。特别是,穷举法是为了因子,需时约永远的大小大于大约7-9的未标记的图形。


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

For most applications, sdmat is dominated by structdist; the former is retained largely for reasons of compatibility.
对于大多数应用程序,sdmat是占主导地位的保留structdist,前者主要是出于兼容性考虑。


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


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



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

Butts, C.T. and Carley, K.M.  (2005).  &ldquo;Some Simple Algorithms for Structural Comparison.&rdquo;  Computational and Mathematical Organization Theory, 11(4), 291-305.
Butts, C.T., and Carley, K.M.  (2001).  &ldquo;Multivariate Methods for Interstructural Analysis.&rdquo;  CASOS Working Paper, Carnegie Mellon University.

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

hdist, structdist
hdist,structdist


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


#Generate two random graphs[产生两个随机图]
g<-array(dim=c(3,5,5))
g[1,,]<-rgraph(5)
g[2,,]<-rgraph(5)

#Copy one of the graphs and permute it[复制的图形,表,改变它]
g[3,,]<-rmperm(g[2,,])

#What are the structural distances between the labeled graphs?[标记的图形结构之间的距离是什么?]
sdmat(g,exchange.list=1:5)

#What are the structural distances between the underlying unlabeled [什么是底层的未标记的结构之间的距离]
#graphs?[图?]
sdmat(g,method="anneal", prob.init=0.9, prob.decay=0.85,
    freeze.time=50, full.neighborhood=TRUE)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-6 14:03 , Processed in 0.024121 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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