smco(smco)
smco()所属R语言包:smco
simple Monte Carlo optimizer using adaptive coordinate sampling
简单的蒙特卡洛优化利用自适应坐标采样
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function smco is use to optimize non-linear complex functions based on three simple ideas: first, the sampling of each component of the solution vector, one at a time, based on a truncated normal distribution; second, the evolution of the standard deviation of the sampling distribution in each iteration, as a mechanism of self-adaptation; and third, the restart of the algorithm for escaping of local optima.
函数smco使用优化非线性复杂功能的基础上三个简单的想法:第一,采样的各组成部分的解向量,一次一个,截断正态分布的基础上,第二,演变在每次迭代的抽样分布的标准差,自我适应的机制;第三,逃离局部最优的算法重新启动。
用法----------Usage----------
smco(par = NULL, fn, gr = NULL, ..., N = length(par),
LB, UB, maxiter = 1000, Co = 0.01, Cmin = 0.0001,
Cmax = 0.5, trc = FALSE, lambda = 20, useBFGS = FALSE,
control = list(), hessian = FALSE)
参数----------Arguments----------
参数:par
Initial values for the parameters to be optimized over. When it is 'NULL' the user must be specify the value for the 'N' parameter and the algorithm it is initializated in a random point.
的参数的初始值进行优化。当它是“NULL”时,用户必须指定的值的N的参数和算法,它是在一个随机点initializated。
参数:fn
A function to be minimized (or maximized), with first argument the vector of parameters over which minimization is to take place. It should return a scalar result.
一个函数被最小化或最大化,与第一个参数的参数向量最小化是要发生的。它应该返回一个标量结果。
参数:gr
A function to return the gradient for the '"L-BFGS-B"' method when the option trc is set to TRUE. If it is 'NULL', a finite-difference approximation will be used.
函数返回的梯度“L-BFGS-B”的选项时,trc设置为TRUE“的方法。如果它是“NULL”,有限差分近似将被使用。
参数:...
Further arguments to be passed to 'fn' and 'gr'.
进一步的参数被传递到“FN”和“GR”。
参数:N
The number of dimensions of the vector of solution variables
溶液变量的矢量的维度的数目
参数:LB, UB
Lower and upper bounds on the variables.
上限和下限的变量。
参数:maxiter
The maximum number of iterations. The number of function calls to '"L-BFGS-B"' implementation is not taking into count.
最大迭代次数。的“L-BFGS-B”的实施没有考虑到数函数的调用次数。
参数:Co, Cmin, Cmax
Initial, minimum and maximum values for the standard deviation of the truncated normal distribution
初始,最小和最大的截断的正态分布的标准偏差值
参数:trc
Logical. When it is 'TRUE' the progress of the optimization algorithm is reported.
逻辑。当它是“TRUE”的优化算法的进展报告。
参数:lambda
Restarting parameter. When the algorithm reaches 'lambda' * 'N' iterations without found a new local optimum the restart ocurrs.
重新启动参数。当算法达到拉姆达*N次迭代没有找到一个新的地方重新启动ocurrs最佳。
参数:useBFGS
Logical. When it value is 'TRUE', first, a new random value for the current coordinate is generated using a truncated normal distribution; second, the one-dimensional optimization of the value of the current coordinate is made using the '"L-BFGS-B"' method implemented in the optim function
逻辑。当它的值是“TRUE”,首先,当前坐标的一个新的随机值产生使用截短的正态分布;第二,一维的优化的当前坐标的值是由使用“”L-BFGS B“的方法在optim功能实现
参数:control
A list of control parameters for the '"L-BFGS-B"' implemented in the optim function.
“L-BFGS-B”的在optim功能实现控制参数的列表。
参数:hessian
A control parameter for the '"L-BFGS-B"' implemented in the optim function.
的控制参数为“L-BFGS-B”optim函数实现。
Details
详细信息----------Details----------
The algorithm tries to improve the current solution by changing the i-th coordinate by a random value generated using a truncated normal distribution. Only a random value for each coordinate is generated each time. When the parameter 'useBFGS' is 'TRUE', the new random value is used as the initial point for the one-dimensional optimization of the i-th coordinate using '"L-BFGS-B"' method implemented in the optim function. <br><br>
该算法尝试以改善目前的解决方案,通过改变使用截断正态分布生成的随机值的第i个坐标。为每个坐标只有一个随机值生成每次。当的参数useBFGS“”TRUE“时,新的随机值被用作初始的第i个点的一维优化协调使用”L-BFGS-B“在<X实施方法>功能。参考参考
The standard deviation of the truncated random deviation changes in each iteration in a random way. The values of the standard deviation are bounded to the interval defined by 'Cmin' and 'Cmax'. <br><br>
截断的随机偏差,在每次迭代中,以随机方式变化的标准偏差。的标准偏差的值是有界的由的Cmin和的Cmax定义的间隔时间。参考参考
When the algorithm reaches 'lambda' * 'N' iterations without found a new local optimum the restart ocurrs. For this, a new random current solution is generated. <br><br>
当算法达到拉姆达*N次迭代没有找到一个新的地方重新启动ocurrs最佳。对于这一点,产生一个新的随机的当前解决方案。参考参考
值----------Value----------
A list with components:
组件列表:
<table summary="R valueblock"> <tr valign="top"><td>par</td> <td> The best set of parameters found.</td></tr>
<table summary="R valueblock"> <tr valign="top"> <TD> par</ TD> <TD>发现的最好的一组参数。</ TD> </ TR>
<tr valign="top"><td>value</td> <td> The value of 'fn' corresponding to 'par'.</td></tr>
<tr valign="top"> <TD> value </ TD> <TD>“FN”对应的“面值”的价值。</ TD> </ TR>
<tr valign="top"><td>f.opt, f.min, f.curr</td> <td> Vectors of size 'maxiter' containing the values of the global optimum, local optimum and current value of the function 'fn' for the current iteration.</td></tr>
<tr valign="top"> <TD> f.opt, f.min, f.curr</ TD> <TD>向量的大小“maxiter”,其中包含全局最优,局部最优和电流值的函数的函数值的当前迭代。</ TD> </ TR>
<tr valign="top"><td>call</td> <td> The call to the function.</td></tr>
<tr valign="top"> <TD> call </ TD> <TD>调用该函数。</ TD> </ TR>
</table>
</ TABLE>
(作者)----------Author(s)----------
Prof. Juan D. Velasquez, Ph.D.<br>
Grupo de Computacion Aplicada<br>
Univesidad Nacional de Colombia<br>
jdvelasq@unal.edu.co<br>
参考文献----------References----------
Velasquez, J. D. (2011). A Simple Monte Carlo optimizer based on Adaptive Coordinate Sampling. Submitted to Operation Research Letters.
参见----------See Also----------
optim
optim
实例----------Examples----------
SphereModel.fcn <-
function( x ) {
return(sum(x ^ 2))
}
f = SphereModel.fcn;
ndim = 10;
LB = rep( -600.000, ndim);
UB = rep( 600.000, ndim);
maxiter = 100;
s = smco(par = NULL, fn = SphereModel.fcn, N = ndim, LB = LB,
UB = UB, maxiter = maxiter, Co = 0.01, Cmin = 0.0001,
Cmax = 0.5, trc = TRUE, lambda = 20,
useBFGS = TRUE, control = list(maxit = 10))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|