gscor(sna)
gscor()所属R语言包:sna
Find the Structural Correlations Between Two or More Graphs
两个或多个图形结构之间的相关性
译者:生物统计家园网 机器人LoveR
描述----------Description----------
gscor finds the product-moment structural correlation between the adjacency matrices of graphs indicated by g1 and g2 in stack dat (or possibly dat2) given exchangeability list exchange.list. Missing values are permitted.
gscor发现产品时刻结构图的邻接矩阵之间的相关性g1和g2在堆栈dat(或可能dat2)可交换列表exchange.list。遗漏值是允许的。
用法----------Usage----------
gscor(dat, dat2=NULL, g1=NULL, g2=NULL, diag=FALSE,
mode="digraph", method="anneal", reps=1000, prob.init=0.9,
prob.decay=0.85, freeze.time=25, full.neighborhood=TRUE,
exchange.list=0)
参数----------Arguments----------
参数:dat
a stack of input graphs.
输入图堆栈。
参数:dat2
optionally, a second graph stack.
任选的第二图表堆栈。
参数:g1
the indices of dat reflecting the first set of graphs to be compared; by default, all members of dat are included.
指数dat反映了第一套图形进行比较,默认情况下,所有成员dat都包含。
参数:g2
the indices or dat (or dat2, if applicable) reflecting the second set of graphs to be compared; by default, all members of dat are included.
指数或dat(dat2,如果适用),反映了第二套图形进行比较,默认情况下,所有成员dat都包含。
参数: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"。
参数: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"。
参数:reps
number of iterations for Monte Carlo method.
蒙特卡罗法的迭代次数。
参数:prob.init
initial acceptance probability for the annealing routine.
初始接受概率的退火程序。
参数:prob.decay
cooling multiplier for the annealing routine.
冷却乘数的退火程序。
参数:freeze.time
freeze time for the annealing routine.
退火常规冻结时间。
参数:full.neighborhood
should the annealer evaluate the full neighborhood of pair exchanges at each iteration?
应退火评估,对交流,在每一次迭代的附近吗?
参数: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矩阵。
Details
详细信息----------Details----------
The structural correlation coefficient between two graphs G and H is defined as
两个图G和H的结构之间的相关系数被定义为
scor(G,H | L_G,L_H) = max_[L_G,L_H] cor(l(G),l(H))</i>
SCOR(G,H L_G,L_H)= MAX_ [L_G,L_H] COR(L(G),L(H))</ I>
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 exchangeability 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 graph correlation (the default), then, one could simply let exchange.list equal any single number. To obtain the standard graph correlation, one would use the vector 1:n.
访问置换集的exchange.list的说法,这是通过以下方式处理决定。首先,exchange.list扩大,以填补×2矩阵。 exchange.list如果是单数,这是平凡通过复制,如果exchange.list是一个长度为n的向量,矩阵所形成的cbinding两个副本。如果exchange.list已经的NX2矩阵,它保持原样。 NX2可交换矩阵一旦已经形成,它被解释如下:列请参阅图1和2中,分别;行指他们在原来的邻接矩阵的相应的顶点和顶点采取理论上可交换的,当且仅当其对应的可交换矩阵值是相同的。为了获得一个未标记的图形相关(默认值),然后,可以简单地让exchange.list等于任何单一的数字。要获得标准的图形化相关,将使用向量1:n。
Because the set of accessible permutations is, in general, very large (o(n!)), searching the set for the maximum correlation is a non-trivial affair. Currently supported methods for estimating the structural correlation 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 correlation matrices are p.s.d., and are p.d. so long as no graph within the set is a linear combination of any other under any accessible permutation. Their eigendecompositions are meaningful and they may be used in linear subspace analyses, so long as the researcher is careful to interpret the results in terms of the appropriate set of accessible labelings. Classical null hypothesis tests should not be employed with structural correlations, and QAP tests are almost never appropriate (save in the uniquely labeled case). See cugtest for a more reasonable alternative.
结构的相关矩阵,PSD,是Pd ,只要没有集内的曲线图是任何其他任何可访问的置换下的线性组合。他们的特征分解是有意义的,它们可用于线性子空间分析,只要研究人员小心地解释结果,在适当的访问标号。古典的零假设测试不应该与结构相关和QAP测试是几乎从来没有适当的(独特的标记的情况下)。见cugtest一个更合理的替代方案。
值----------Value----------
An estimate of the structural correlation matrix
的结构的相关矩阵的估计
警告----------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----------
Consult Butts and Carley (2001) for advice and examples on theoretical exchangeability.
咨询Butts和卡利(2001)的理论可交换性的建议和示例。
(作者)----------Author(s)----------
Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>
参考文献----------References----------
<h3>See Also</h3>
实例----------Examples----------
#Generate two random graphs[产生两个随机图]
g.1<-rgraph(5)
g.2<-rgraph(5)
#Copy one of the graphs and permute it[复制的图形,表,改变它]
perm<-sample(1:5)
g.3<-g.2[perm,perm]
#What are the structural correlations between the labeled graphs?[标记的图形结构之间的相关性是什么?]
gscor(g.1,g.2,exchange.list=1:5)
gscor(g.1,g.3,exchange.list=1:5)
gscor(g.2,g.3,exchange.list=1:5)
#What are the structural correlations between the underlying [结构之间的相互关系的基础是什么]
#unlabeled graphs?[未标记的图?]
gscor(g.1,g.2)
gscor(g.1,g.3)
gscor(g.2,g.3)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|