数值优化学习——wolfe条件里的线搜索算法

翻译自numerical optimization Chapter3 Line Search Methods
【没写完,可参考http://blog.csdn.net/fangqingan_java/article/details/46405669
Wolfe条件(或强Wolfe条件)是广泛使用并且较为有效的终止条件。

下面描述一个一维的线搜索过程,该过程确保对于给定的任意参数c1,c2(1>c2>c>0),能够找到一个能够满足强Wolfe条件的步长。 首先,我们假设方向p是下降方向,函数f沿着该方向在下面是有界的。

算法分为两个步骤,第一步首先开始于一个对于步长α的估计值α1,然后后续不断扩大其大小,直到找到一个合适的步长或者一个包含目标步长的区间。如果是后者的话(找到区间),就需要不断调用第二步,称为zoom的函数,来不断缩小区间大小,直到找到合适步长。

line search算法的一个形式说明如下。公式这里写图片描述为足够的下降条件,公式

  • 4
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
matlab最优化程序包括:无约束一维极值问题、进退法、黄金分割法、斐波那契法、牛顿法基本牛顿法、全局牛顿法、割线法、抛物线法、三次插值法、可接受搜索法、Goidstein法、Wolfe Powell法、单纯形搜索法、Powell法、最速下降法、共轭梯度法、牛顿法、修正牛顿法、拟牛顿法、信赖域法、显式最速下降法、Rosen梯度投影法、罚函数法、外点罚函数法、內点罚函数法、混合罚函数法、乘子法、G-N法、修正G-N法、L-M法、线性规划、单纯形法、修正单纯形法、大M法、变量有界单纯形法、整数规划、割平面法、分支定界法、0-1规划、二次规划、拉格朗曰法、起作用集算法、路径跟踪法、粒子群优化算法、基本粒子群算法、带压缩因子的粒子群算法、权重改进的粒子群算法、线性递减权重法、自适应权重法、随机权重法、变学习因子的粒子群算法、同步变化的学习因子、异步变化的学习因子、二阶粒子群算法、二阶振荡粒子群算法 (matlab optimization process includes Non-binding one-dimensional extremum problems Advance and retreat method Golden Section Fibonacci method of basic Newton s method Newton s method Newton s Law of the global secant method parabola method acceptable to the three interpolation search method Goidstein France Wolfe.Powell France Simplex search method Powell steepest descent method Conjugate gradient method Newton s method Newton s method to amend Quasi-Newton Method trust region method explicitly steepest descent method, Rosen gradient projection method Penalty function method outside the penalty function method within the penalty function method Mixed penalty function multiplier method G-N was amended in G-N method L-M method Of linear programming simplex method, revised simplex method Big M method variables bounded simplex method, Cutting Plane Method integer programming branch and bound method 0-1 programming quadratic programming )
以下是一个简单的MATLAB例程,演示了如何实现满足Wolfe条件线搜索算法: ```matlab function [alpha, num_evals] = wolfe_search(f, g, x, p, alpha_init) % Set the initial values of alpha and other constants alpha = alpha_init; c1 = 1e-4; c2 = 0.9; max_evals = 100; num_evals = 0; % Evaluate the objective function and its gradient at the starting point f0 = f(x); g0 = g(x); % Loop until the Wolfe conditions are satisfied or the maximum number of % evaluations is reached while num_evals < max_evals % Evaluate the objective function and its gradient at the new point f1 = f(x + alpha*p); g1 = g(x + alpha*p); % Check the Armijo condition if f1 > f0 + c1*alpha*g0'*p break; end % Check the curvature condition if g1'*p < c2*g0'*p break; end % If both conditions are satisfied, return the current alpha value alpha_prev = alpha; alpha = 0.5*(alpha + alpha_init); num_evals = num_evals + 1; end % Return the number of function evaluations used if num_evals == max_evals fprintf('Maximum number of function evaluations reached\n'); end end ``` 该例程采用了传统的回溯线搜索算法,在每次迭代中计算一个新的alpha值,然后检查是否满足Armijo条件和曲率条件。如果两个条件都得到满足,就返回当前的alpha值。如果没有满足,则将alpha值减半并继续迭代,直到达到最大迭代次数或满足条件为止。 请注意,此代码仅为演示目的。在实际应用中,您可能需要根据您的需求进行修改。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值