lab.optimize(sna)
lab.optimize()所属R语言包:sna
Optimize a Bivariate Graph Statistic Across a Set of Accessible Permutations
优化无障碍排列在一组二元图表统计
译者:生物统计家园网 机器人LoveR
描述----------Description----------
lab.optimize is the front-end to a series of heuristic optimization routines (see below), all of which seek to maximize/minimize some bivariate graph statistic (e.g., graph correlation) across a set of vertex relabelings.
lab.optimize是一系列启发式优化程序(见下文),所有这一切都寻求最大化/最小化(例如,图形相关)横跨一组顶点relabelings的的一些二元图统计的前端。
用法----------Usage----------
lab.optimize(d1, d2, FUN, exchange.list=0, seek="min",
opt.method=c("anneal", "exhaustive", "mc", "hillclimb",
"gumbel"), ...)
lab.optimize.anneal(d1, d2, FUN, exchange.list=0, seek="min",
prob.init=1, prob.decay=0.99, freeze.time=1000,
full.neighborhood=TRUE, ...)
lab.optimize.exhaustive(d1, d2, FUN, exchange.list=0, seek="min", ...)
lab.optimize.gumbel(d1, d2, FUN, exchange.list=0, seek="min",
draws=500, tol=1e-5, estimator="median", ...)
lab.optimize.hillclimb(d1, d2, FUN, exchange.list=0, seek="min", ...)
lab.optimize.mc(d1, d2, FUN, exchange.list=0, seek="min",
draws=1000, ...)
参数----------Arguments----------
参数:d1
a single graph.
一个单一的图形。
参数:d2
another single graph.
另一种单一的图形。
参数:FUN
a function taking two graphs as its first two arguments, and returning a numeric value.
一个函数的两个图的前两个参数,并返回一个数值。
参数: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矩阵。
参数:seek
"min" if the optimizer should seek a minimum, or "max" if a maximum should be sought.
“最小值”,如果优化器应该寻求最低限度,或“最大”的话,应寻求最大。
参数:opt.method
the particular optimization method to use.
使用的特定优化方法。
参数:prob.init
initial acceptance probability for a downhill move (lab.optimize.anneal only).
初始接受概率为一下坡移动(lab.optimize.anneal)。
参数:prob.decay
the decay (cooling) multiplier for the probability of accepting a downhill move (lab.optimize.anneal only).
衰减(冷却)乘数的概率接受一个下坡移动(lab.optimize.anneal)。
参数:freeze.time
number of iterations at which the annealer should be frozen (lab.optimize.anneal only).
应当被冻结在该退火炉的迭代次数(lab.optimize.anneal只)。
参数:full.neighborhood
should all moves in the binary-exchange neighborhood be evaluated at each iteration? (lab.optimize.anneal only).
在每次迭代都应该移动的二进制交换邻域进行评估? (lab.optimize.anneal)。
参数:tol
tolerance for estimation of gumbel distribution parameters (lab.optimize.gumbel only).
Gumbel分布参数估计的耐受性(lab.optimize.gumbel)。
参数:estimator
Gumbel distribution statistic to use as optimal value prediction; must be one of “mean”, “median”, or “mode” (lab.optimize.gumbel only).
Gumbel分布统计,使用最优值的预测,必须是一个“中庸”,“中位数”,或“模式”(lab.optimize.gumbel)。
参数:draws
number of draws to take for gumbel and mc methods.
一些即将采取的冈贝尔和MC方法。
参数:...
additional arguments to FUN.
附加参数到FUN。
Details
详细信息----------Details----------
lab.optimize is the front-end to a family of routines for optimizing a bivariate graph statistic over a set of permissible relabelings (or equivalently, permutations). 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 graph statistic (the default), then, one could simply let exchange.list equal any single number. To obtain the labeled statistic, one would use the vector 1:n.
lab.optimize是前端到家庭例程的优化二元图统计在一组的的允许relabelings(或等价置换)。访问置换集的exchange.list的说法,这是通过以下方式处理决定。首先,exchange.list扩大,以填补×2矩阵。 exchange.list如果是单数,这是平凡通过复制,如果exchange.list是一个长度为n的向量,矩阵所形成的cbinding两个副本。如果exchange.list已经的NX2矩阵,它保持原样。一旦的NX2 exchangeabiliy矩阵已经形成,它被解释如下:列请参阅图1和2中,分别;行指他们在原来的邻接矩阵的相应的顶点和顶点采取理论上可交换的,当且仅当其对应的可交换矩阵值是相同的。为了获得一个未标记的图形统计(默认值),然后,可以简单地让exchange.list等于任何单一的数字。为了获得标记的统计,一会用向量1:n。
Assuming a non-degenerate set of accessible permutations/relabelings, optimization proceeds via the algorithm specified in opt.method. The optimization routines which are currently implemented use a variety of different techniques, each with certain advantages and disadvantages. A brief summary of each is as follows:
假设一个非退化的设置,访问的的排列/ relabelings,优化所得通过在opt.method指定的算法。当前实施的优化例程使用的各种不同的技术,每一个具有一定的优点和缺点。每个的简要总结如下所示:
<ol> exhaustive search (“exhaustive”): Under exhaustive search, the entire space of accessible permutations is combed for the global optimum. This guarantees a correct answer, but at a very high price: the set of all permutations grows with the factorial of the number of vertices, and even substantial exchangeability constraints are unlikely to keep the number of permutations from growing out of control. While exhaustive search is possible for small graphs, unlabeled structures of size approximately 10 or greater cannot be treated using this algorithm within a reasonable time frame.
<OL>穷举搜索(“面面俱到”):在穷举搜索,使整个空间的访问排列梳理,为全球最佳。这保证了正确的答案,但在一个非常高的价格组的所有排列的阶乘的顶点数量增长,即使是大量的可交换性的限制是不太可能的排列数保持增长失控。穷举搜索是可能的小图,无标签的结构,大小约大于或等于10不能被视为一个合理的时间框架内使用这种算法。
Approximate complexity: on the order of prod( |V_i|!, i in L ), where L is the set of exchangeability classes.
约复杂的顺序prod( |V_i|!, i in L ),其中L是组可交换类。
hill climbing (``hillclimb''): The hill climbing algorithm employed here searches, at each iteration, the set of all permissible binary exchanges of vertices. If one or more exchanges are found which are superior to the current permutation, the best alternative is taken. If no superior alternative is found, then the algorithm terminates. As one would expect, this algorithm is guaranteed to terminate on a local optimum; unfortunately, however, it is quite prone to becoming ``stuck'' in suboptimal solutions. In general, hill climbing is not recommended for permutation search, but the method may prove useful in certain circumstances.
爬山(“hillclimb”):爬山算法搜索,在每次迭代时,允许二进制交流的顶点的集合。如果一个或更多的交流,发现这是优于当前排列,最好的办法是采取。卓越的替代方案,如果没有被发现,那么该算法终止。正如人们所期望的那样,该算法保证终止于局部最优;然而,不幸的是,这是很容易成为坚持次优的解决方案。在一般情况下,不建议爬山排列搜索,但该方法在某些情况下可能是有用的。
Approximate complexity: on the order of |V(G)|^2 per iteration, total complexity dependent on the number of iterations.
近似的复杂性:|V(G)|^2:每次迭代,总复杂性依赖的迭代次数的顺序。
simulated annealing (``anneal''): The (fairly simple) annealing procedure here employed proceeds as follows. At each iteration, the set of all permissible binary exchanges (if full.neighborhood==TRUE) or a random selection from this set is evaluated. If a superior option is identified, the best of these is chosen. If no superior options are found, then the algorithm chooses randomly from the set of alternatives with probability equal to the current temperature, otherwise retaining its prior solution. After each iteration, the current temperature is reduced by a factor equal to prob.decay; the initial temperature is set by prob.init. When a number of iterations equal to freeze.time have been completed, the algorithm “freezes.” Once “frozen,” the annealer hillclimbs from its present location until no improvement is found, and terminates. At termination, the best permutation identified so far is utilized; this need not be the most recent position (though it sometimes is).
模拟退火法(“退火”):(非常简单)退火过程在就业过程如下。在每次迭代中,组所有允许二进制交换(如果full.neighborhood==TRUE)或从本组随机选择进行评估。如果一个更好的选择是确定的,最好的选择。如果没有发现高级选项,然后该算法将随机选择从该组的替代品的概率等于当前温度,否则保持其现有的解决方案。每次迭代后,当前温度减少的一个因素等于prob.decay的初始温度是由prob.init。当一个数迭代freeze.time相等已完成,该算法“冻结”一旦“冻结”的退火炉hillclimbs从目前的位置,直到发现没有改善,并终止。在终止排列,最好是利用目前已确定的,这不一定是最近的位置(虽然它有时是)。
Simulated annealing is sometimes called “noisy hill climbing” because it uses the introduction of random variation to a hill climbing routine to avoid convergence to local optima; it works well on reasonably correlated search spaces with well-defined solution neighborhoods, and is far more robust than hill climbing algorithms. As a general rule, simulated annealing is recommended here for most graphs up to size approximately 50. At this point, computational complexity begins to become a serious barrier, and alternative methods may be more practical.
模拟退火算法有时也被称为“吵爬坡”,因为它使用引进的一个爬坡常规的随机变化,以避免收敛到局部最优解,它的工作原理以及合理的相关搜索空间定义的解决方案街区,是远远强大的比爬山算法。作为一般的规则,模拟退火这里推荐用于大多数图形的大小约为50。在这一点上,计算复杂度开始成为一个严重的障碍,和替代方法可能更为实际。
Approximate complexity: on the order of |V(G)|^2*freeze.time if full.neighborhood==TRUE, otherwise complexity scales approximately linearly with freeze.time. This can be misleading, however, since failing to search the full neighborhood generally requires that freeze.time be greatly increased.)
近似的复杂性:对秩序的|V(G)|^2*freeze.time如果full.neighborhood==TRUE,否则复杂的尺度近似线性freeze.time。然而,这可能会产生误导,因为没有搜索完整的附近通常需要freeze.time将大大增加。)
blind monte carlo search (``mc''): Blind monte carlo search, as the name implies, consists of randomly drawing a sample of permutations from the accessible permutation set and selecting the best. Although this not such a bad option when A) a large fraction of points are optimal or nearly optimal and B) the search space is largely uncorrelated, these conditions do not seem to characterize most permutation search problems. Blind monte carlo search is not generally recommended, but it is provided as an option should it be desired (e.g., when it is absolutely necessary to control the number of permutations examined).
瞎蒙地卡罗搜索(“三菱商事”):盲蒙特卡罗搜索,正如其名称所暗示的,包括从访问的排列组中随机抽取一个样本的排列和选择最好的。虽然这不是一个不错的选择A)点很大一部分是最优或接近最优,B)主要是不相关的搜索空间,这些条件似乎并不表征排列搜索问题。盲蒙特卡罗搜索一般不建议,但它是作为选件提供所需的(例如,当它是绝对必要的控制数的排列检查)。
Approximate complexity: linear in draws.
约的复杂性:线性在draws。
extreme value estimation (``gumbel''): Extreme value estimation attempts to estimate a global optimum via stochastic modeling of the distribution of the graph statistic over the space of accessible permutations. The algorithm currently proceeds as follows. First, a random sample is taken from the accessible permutation set (as with monte carlo search, above). Next, this sample is used to fit an extreme value (gumbel) model; the gumbel distribution is the limiting distribution of the extreme values from samples under a continuous, unbounded distribution, and we use it here as an approximation. Having fit the model, an associated statistic (the mean, median, or mode as determined by estimator) is then used as an estimator of the global optimum.
极端值估计(冈贝尔):极端值估计尝试通过随机建模无障碍的排列在空间的分布的曲线图统计来估计全局最优。目前的算法进行如下。首先,采取随机抽样的可访问的排列组(如蒙特卡罗搜索,以上)。然后,此示例使用,以适应极端值(冈贝尔)模型; Gumbel分布的极限分布的极端值的样品在一个连续的,无界的分布,我们在这里使用它作为一个近似。经拟合模型,相关的统计量(均值,中位数,或模式由estimator),然后作为全球最佳的估计。
Obviously, this approach has certain drawbacks. First of all, our use of the gumbel model in particular assumes an unbounded, continuous underlying distribution, which may or may not be approximately true for any given problem. Secondly, the inherent non-robustness of extremal problems makes the fact that our prediction rests on a string of approximations rather worrisome: our idea of the shape of the underlying distribution could be distorted by a bad sample, our parameter estimation could be somewhat off, etc., any of which could have serious consequences for our extremal prediction. Finally, the prediction which is made by the extreme value model is nonconstructive, in the sense that no permutation need have been found by the algorithm which induces the predicted value. On the bright side, this could allow one to estimate the optimum without having to find it directly; on the dark side, this means that the reported optimum could be a numerical chimera.
显然,这种方法有一定的缺点。首先,我们使用特别的冈贝尔模型假定无界的,连续的基本分布,这可能会或可能不会在约真正的,对于任何给定的问题。其次,固有的非鲁棒性极值问题使得我们的预测依赖的近似,而令人担忧的字符串上的事实,即:我们的想法,底层分布的形状可以由一个坏样品扭曲,可能是有点不同,我们的参数估计,等等,任何情况均可能对我们的极值预测的严重后果。最后,在预测的极端值模型,它是由nonconstructive,在这个意义上,已发现由诱导的预测值的算法。它没有置换需要。在光明的一面,这可以让一个估计,而无需直接找到它的最佳,在黑暗的一面,这意味着,最佳可能是一个数值嵌合体。
At this time, extreme value estimation should be considered experimental, and is not recommended for use on substantive problems. lab.optimize.gumbel is not guaranteed to work properly, or to produce intelligible results; this may eventually change in future revisions, or the routine may be scrapped altogether.
在这个时候,极端值估计应被认为是实验性的,是不建议使用的实质性问题。 lab.optimize.gumbel不保证能正常工作,或者产生理解的结果,这最终可能会改变将来的修订版,或该程序可以被完全废止。
Approximate complexity: linear in draws. </ol>
约的复杂性:线性在draws。 </ OL>
This list of algorithms is itself somewhat unstable: some additional techniques (canonical labeling and genetic algorithms, for instance) may be added, and some existing methods (e.g., extreme value estimation) may be modified or removed. Every attempt will be made to keep the command format as stable as possible for other routines (e.g., gscov, structdist) which depend on lab.optimize to do their heavy-lifting. In general, it is not expected that the end-user will call lab.optimize directly; instead, most end-user interaction with these routines will be via the structural distance/covariance functions which used them.
此列表的算法是有点不稳定,一些额外的技术(规范的标记和遗传算法,例如)可能会增加,并可能被修改或删除一些现有的方法(如极端值估计)。将尽一切努力,尽量保持稳定,以保持其命令格式为其他例程(例如,gscov,的structdist)依赖于lab.optimize做他们的繁重工作。在一般情况下,没有预期的最终用户将调用“lab.optimize直接,相反,大多数最终用户的交互,这些程序将通过结构距离/协方差函数加以利用。
值----------Value----------
The estimated global optimum of FUN over the set of relabelings permitted by exchange.list
估计全球最佳的FUN超过设定的relabelings允许的exchange.list
(作者)----------Author(s)----------
Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>
参考文献----------References----------
Butts, C.T. and Carley, K.M. (2005). “Some Simple Algorithms for Structural Comparison.” Computational and Mathematical Organization Theory, 11(4), 291-305.
Butts, C.T., and Carley, K.M. (2001). “Multivariate Methods for Interstructural Analysis.” CASOS Working Paper, Carnegie Mellon University.
参见----------See Also----------
gscov, gscor, structdist, sdmat
gscov,gscor,structdist,sdmat
实例----------Examples----------
#Generate a random graph and copy it[生成一个随机的图形,并把它复制]
g<-rgraph(10)
g2<-rmperm(g) #Permute the copy randomly[随机表,改变副本]
#Seek the maximum correlation[寻求最大的相关性]
lab.optimize(g,g2,gcor,seek="max",opt.method="anneal",freeze.time=50,
prob.decay=0.9)
#These two don't do so well...[这两个不这样做...]
lab.optimize(g,g2,gcor,seek="max",opt.method="hillclimb")
lab.optimize(g,g2,gcor,seek="max",opt.method="mc",draws=1000)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|