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

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

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

                                        The Self-Organising Migrating Algorithm
                                         自筹备迁移算法

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

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

The Self-Organising Migrating Algorithm is a general-purpose, stochastic optimisation algorithm. The approach is similar to that of genetic algorithms, although it is based on the idea of a series of “migrations” by a fixed set of individuals, rather than the development of successive generations. It can be applied to any cost-minimisation problem with a bounded parameter space, and is robust to local minima.
自筹备迁移算法是一种通用的,随机优化算法。这种方法类似于遗传算法,虽然它是基于“迁移”的个人,而不是一个固定的一组连续几代的发展,一系列的想法。它可以适用于任何具有有界参数空间的成本最小化问题,并且是鲁棒局部极小。


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


soma(costFunction, bounds, options = list(), strategy = "all2one", ...)

## S3 method for class 'soma'
plot(x, y = NULL, ...)



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

参数:costFunction
A cost function which takes a numeric vector of parameters as its first argument, and returns a numeric scalar representing the associated cost value.
的成本函数,它接受一个数字的参数向量作为第一个参数,并返回一个数字标量相关的成本值。


参数:bounds
A list with elements min and max, each a numeric vector giving the upper and lower bounds for each parameter, respectively.
列表的元素min和max,每一个数值向量,分别给每个参数的上限和下限。


参数:options
A list of options for the SOMA algorithm itself. See Details.
SOMA的选项列表算法本身。查看详细信息。


参数:strategy
The strategy type to use. Currently "all2one" is the only supported value.
使用的策略类型。目前"all2one"是唯一支持的值。


参数:...
Additional parameters to costFunction, or to plot.
额外的参数,以costFunction,或plot。


参数:x
An object of class "soma".
对象的类"soma"。


参数:y
Ignored.
忽略。


Details

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

A number of options are available to adjust the behaviour of the optimisation, and its termination criteria. The default values used here are recommended by Zelinka (2004).   
许多选项可供选择的优化调整行为,它的终止条件。此处使用的缺省值建议者泽林卡(2004)。

pathLength:The distance towards the leader that individuals may migrate. A value of 1 corresponds to the leader's position itself, and values greater than one (recommended) allow for some overshoot. The default is 3.
光程:对领导者的距离,个人不得迁移。值1对应于领导者的位置,和值大于1(推荐)允许一些过冲。默认值是3。

stepLength:The granularity at which potential steps are evaluated. It is recommended that this not be a whole multiple of the pathLength. The default is 0.11.
步长:粒度在评估潜在的步骤。这是建议,这不是一个整数倍的pathLength。默认值是0.11。

perturbationChance:The probability that individual parameters are changed on any given step. The default is 0.1.
perturbationChance:的概率,在任何给定的步骤改变各个参数。默认值是0.1。

minAbsoluteSep:The smallest absolute difference between the maximum and minimum cost function values. If the difference falls below this minimum, the algorithm will terminate. The default is 0, meaning that this termination criterion will never be met.
minAbsoluteSep:最小的最大和最小的成本函数值之间的绝对差。如果该差值低于这一最小值,该算法将终止。默认值是0,这意味着终止条件,这将永远不会被满足。

minRelativeSep:The smallest relative difference between the maximum and minimum cost function values. If the difference falls below this minimum, the algorithm will terminate. The default is 0.001.
minRelativeSep:之间的最大和最小的代价函数值最小的相对差。如果该差值低于这一最小值,该算法将终止。默认值是0.001。

nMigrations:The maximum number of migrations to complete. The default is 20.
nMigrations:迁移完成的最大数量。默认值是20。

populationSize:The number of individuals in the population. It is recommended that this be somewhat larger than the number of parameters being optimised over, and it should not be less than 2. The default is 10.   
populationSize:在人群中的个体的数量。据建议,这是稍微大于被优化过的数量的参数,它不应该是小于2。默认值是10。


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

A list of class "soma", containing the following elements. <table summary="R valueblock"> <tr valign="top"><td>leader</td> <td> The index of the &ldquo;leader&rdquo;, the individual in the population with the lowest cost.</td></tr> <tr valign="top"><td>population</td> <td> A matrix whose columns give the parameter values for each individual in the population at convergence.</td></tr> <tr valign="top"><td>cost</td> <td> A vector giving the cost function values for each individual at convergence.</td></tr> <tr valign="top"><td>history</td> <td> A vector giving the cost of the leader for each migration during the optimisation. This should be nonincreasing.</td></tr> <tr valign="top"><td>migrations</td> <td> The number of migrations completed.</td></tr> </table> A plot method is available for this class, which shows the history of leader cost values during the optimisation.
列表类"soma",包含以下元素的。 <table summary="R valueblock"> <tr valign="top"> <TD> leader</ TD> <TD>指数的“领头羊”,在人群中的个人用最低的成本。</ TD> </ TR> <tr valign="top"> <TD> population</ TD> <TD>给每个人在人群中的参数值收敛的矩阵列。 / TD> </ TR> <tr valign="top"> <TD> cost</ TD> <td>一个向量给每个人的成本函数值在收敛。</ TD> </ TR > <tr valign="top"> <TD>history</ TD> <td>一个向量给每个移民在优化过程中的成本领导者。这应该是单调不增。</ TD> </ TR> <tr valign="top"> <TD>migrations </ TD> <TD>完成迁移的数量。</ TD> </ TR> </ TABLE> Aplot方法是适用于这一类,它显示了在优化过程中的领导者成本值的历史。


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


R implementation by Jon Clayden &lt;jon.clayden@gmail.com&gt;



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

I. Zelinka (2004). SOMA - self-organizing migrating algorithm. In G.C. Onwubolu &amp; B.V. Babu, eds, New optimization techniques in engineering. Volume 141 of &ldquo;Studies in Fuzziness and Soft Computing&rdquo;, pp. 167-217. Springer.

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

optim implements other general-purpose optimisation methods
optim实现其它通用的优化方法


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


# Rastrigin's function, which contains many local minima[Rastrigin的功能,其中包含许多局部极小]
rastrigin <- function (a) 20 + a[1]^2 + a[2]^2 - 10*(cos(2*pi*a[1])+cos(2*pi*a[2]))

# Find the global minimum over the range -5 to 5 in each parameter[寻找全球最低-5到5的范围内,各参数]
x <- soma(rastrigin, list(min=c(-5,-5),max=c(5,5)))

# Find the location of the leader - should be near the true minimum of c(0,0)[查找的位置的领导者 - 应该是接近真正的最低C(0,0)]
print(x$population[,x$leader])

# Plot the cost history of the leaders[历史上的领导者绘制的成本]
plot(x)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-10 06:08 , Processed in 0.022180 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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