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

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

[复制链接]
发表于 2012-10-1 13:16:47 | 显示全部楼层 |阅读模式
ucminf(ucminf)
ucminf()所属R语言包:ucminf

                                        General-purpose unconstrained non-linear optimization
                                         通用无约束非线性优化

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

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

An algorithm for general-purpose unconstrained non-linear optimization. The algorithm is of quasi-Newton type with BFGS updating of the inverse Hessian and soft line search with a trust region type monitoring of the input to the line search algorithm. The interface of "ucminf" is designed for easy interchange with "optim".
通用的无约束的非线性优化的一种算法。该算法的BFGS拟牛顿型与更新的逆Hessian和软线搜索的信赖域线搜索算法的输入型监控。接口“ucminf”是专为方便转乘Optim的。


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


ucminf(par, fn, gr = NULL, ..., control = list(), hessian=0)



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

参数:par
Initial estimate of minimum for fn.  
初步估计,最低为fn。


参数:fn
Objective function to be minimized.  
目标函数的最小化。


参数:gr
Gradient of objective function. If NULL a finite difference approximation is used.  
目标函数的梯度。如果NULL的有限差分近似使用。


参数:...
Optional arguments passed to the objective and gradient functions.  
可选参数传递的目标和梯度功能。


参数:control
A list of control parameters. See "Details".  
控制参数列表。请参阅“详细信息”。


参数:hessian
Integer value:     
整数值:

0No hessian approximation is returned.  
返回0No麻近似。

1Returns a numerical approximation of the Hessian using "hessian" in the package "numDeriv".   
1Returns的数值近似的Hessian在的包“numDeriv使用麻。

2Returns final approximation of the inverse Hessian based on the series of BFGS updates during optimization.   
2Returns最终逼近的基础上优化的BFGS更新过程中的一系列的反黑森州。

3Same at 2, but will also return the Hessian (the inverse of 2).      If a TRUE or FALSE value is given it will switch between option 1 or 0.  
3Same 2,但也将返回的Hessian(2)逆。如果一个TRUE或FALSE这个值是给它之间切换选项1或0。


Details

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

The algorithm is documented in (Nielsen, 2000) (see References below) together with a comparison to the Fortran subroutine "MINF" and the Matlab function "fminunc". The implementation of "ucminf" in R uses the original Fortran version of the algorithm.
该算法记录(尼尔森,2000年)(请参阅下面的参考资料)Fortran子程序MINF“和Matlab函数fminunc的比较。实施“ucminf在R使用原来的Fortran版本的算法。

The interface in R is designed so that it is very easy to switch between using "ucminf" and "optim". The arguments par, fn, gr, and hessian are all the same (with a few extra options for hessian in "ucminf"). The difference is that there is no method argument in "ucminf" and that some of the components in the control argument are different due to differences in the algorithms.
R中的接口的设计,所以,这是很容易切换使用ucminf和OPTIM之间。的参数par,fn,gr和hessian都是相同的(有一些额外的选项hessian在“ucminf”)。不同的是,有没有method参数ucminf和control参数中的组件是不同的,由于不同的算法。

The algorithm can be given an initial estimate of the Hessian for the optimization and it is possible to get the final approximation of the Hessian based on the series of BFGS updates. This extra functionality may be useful for optimization in a series of related problems.
该算法可以给出一个初始估计的Hessian的优化和它是可以得到最终的近似的Hessian基于一系列BFGS更新。这种额外的功能可能是有用的优化中的一系列相关的问题。

The functions fn and gr can return Inf or NaN if the functions cannot be evaluated at the supplied value, but the functions must be computable at the initial value. The functions are not allowed to return NA. Any names given to par will be copied to the vectors passed to fn and gr. No other attributes of par are copied over.
的功能fn和gr可以返回Inf或NaN的功能都可以在提供的价值进行评估,但必须是可计算的初始值的功能。函数不允许返回NA。 par的任何名称,将被复制到向量传递给fn和gr。 par没有其他属性被复制。

The control argument is a list that can supply any of the following components:
control参数是一个列表,可以提供以下几部分组成:

If trace is positive then detailed tracing information is printed for each iteration.
如果跟踪是肯定的,那么详细的跟踪信息打印每一次迭代。

The algorithm stops when ||F'(x)||_inf <= grtol, that is when the largest absolute value of the gradient is less than
算法停止时||F'(x)||_inf <= grtol,是时的最大绝对值的梯度小于

The algorithm stops when ||x-x_p||_2 <=         xtol*(xtol + ||x||_2), where x_p and x are the previous and current estimate of the minimizer. Thus the algorithm stops when the last relative step length is
该算法停止||x-x_p||_2 <=         xtol*(xtol + ||x||_2),其中x_p和x是以前和当前估计的最小化。因此,算法停止时,相对步长为

Initial maximal allowed step length (radius of trust-region). The value is updated during the
初步的最大允许步长(半径的信赖域)。在更新该值

The maximum number of function evaluations. A function evaluation is counted as one evaluation of the objective function and of the
功能评估的最大数量。作为一个评价的目标函数和函数求值被计算

Either "forward" or "central". Controls the type of finite difference approximation to be used for the gradient if no gradient function is given in the input argument
无论是“前进”或“中心”。控制的类型的有限差分近似梯度要用于如果没有梯度函数的输入参数中给出

Vector of length 2. The step length in finite difference approximation for the gradient. Step length is |x_i|*gradstep[1]+gradstep[2].
向量的长度为2。步长的有限差分近似为渐变。步长|x_i|*gradstep[1]+gradstep[2]。

A vector with an initial approximation to the lower triangle of the inverse Hessian. If not given, the inverse Hessian is initialized as the identity matrix. If H0 is the initial hessian matrix then the lower triangle of the inverse of H0 can be found as
一个向量,其初始近似下三角的逆黑森州。如果没有给出,逆黑森州被初始化为单位矩阵。如果H0然后初始麻矩阵的下三角的逆H0可以发现作为


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


参数:par
Computed minimizer.
计算极小。


参数:value
Objective function value at computed minimizer.
目标函数值计算极小。


参数:convergence
Flag for reason of termination:     
因终止的标志为:

1Stopped by small gradient (grtol).  
由梯度小(grtol)1Stopped。

2Stopped by small step (xtol).  
2Stopped小步骤(xtol)。

3Stopped by function evaluation limit (maxeval).  
3Stopped的功能评价的限制(maxeval)。

4Stopped by zero step from line search  
由零逐步从线搜索4Stopped

-2Computation did not start: length(par) = 0.  
-2Computation没有启动:长度(PAR)= 0。

-4Computation did not start: stepmax is too small.  
-  4Computation没有启动:太小stepmax。

-5Computation did not start: grtol or xtol <= 0.  
-5Computation没有启动:grtol或xtol <= 0。

-6Computation did not start: maxeval <= 0.  
-  6Computation未启动:maxeval <= 0。

-7Computation did not start: given Hessian not pos. definite.     
-7Computation没有无法启动:给黑森州不POS。明确的。


参数:message
String with reason of termination.
原因终止的字符串。


参数:hessian, invhessian
Estimate of (inv.) Hessian at computed minimizer. The type of estimate is given by the input argument "hessian".
计算极小的(inv.)黑森州估计。估计的类型的输入参数“麻”。


参数:invhessian.lt
The lower triangle of the final approximation to the inverse Hessian based on the series of BFGS        updates during optimization.
最终逼近到逆Hessian矩阵的下三角基于BFGS更新在优化过程中的一系列。


参数:info
Information about the search:     
信息搜索:

maxgradient||F'(x)||_inf, the largest element in the absolute value of the gradient at the computed minimizer.  
maxgradient||F'(x)||_inf,在所计算的极小的梯度的绝对值中的最大元素。

laststepLength of last step.  
的最后一步laststepLength。

stepmaxFinal maximal allowed step length.  
stepmaxFinal最大允许步长。

nevalNumber of calls to both objective and gradient function.     
nevalNumber目标和梯度功能调用。


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



&lsquo;UCMINF&rsquo; algorithm design and Fortran code by Hans Bruun Nielsen.

Implementation in <font face="Courier New,Courier" color="#666666"><b>R</b></font> by Stig B. Mortensen, <a href="mailto:stigbm@gmail.com">stigbm@gmail.com</a>.

Modifications by Douglas Bates &lt;bates@stat.wisc.edu&gt;, Nov. 2010, to
support nested optimization and correct issues with printing on Windows.




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

Nonlinear Optimization&rsquo;, Report IMM-REP-2000-18, Department of Mathematical Modelling, Technical University of Denmark. http://www2.imm.dtu.dk/~hbn/publ/TR0019.ps or http://orbit.dtu.dk/recid/200975.
source code can be found at http://www2.imm.dtu.dk/~hbn/Software/ucminf.f. The code has been slightly modified in this package to be suitable for use with R.
package &lsquo;FortranCallsR&rsquo; by Diethelm Wuertz.

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

optim, nlminb, nlm.
optim,nlminb,nlm。


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


## Rosenbrock Banana function[#的Rosenbrock香蕉功能]
fR <- function(x) (1 - x[1])^2 + 100 * (x[2] - x[1]^2)^2
gR <- function(x) c(-400 * x[1] * (x[2] - x[1] * x[1]) - 2 * (1 - x[1]),
                     200 * (x[2] - x[1] * x[1]))

#  Find minimum and show trace[查找最低,并显示跟踪]
ucminf(par = c(2,.5), fn = fR, gr = gR, control = list(trace = 1))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-28 13:45 , Processed in 0.019904 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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