下降方法
本章描述的算法产生极小化序列
其中
我们研究的所有方法都是下降方法,即除
这意味着对所有
即它与负梯度方向成锐角。我们称这样的方向为
一般下降方法
一般下降方法在如下两个步骤之间交替:确定一个下降方向
算法 9.1(一般下降方法) 给定初始点
- 确定下降方向
。 - 直线搜索(line search):选择步长
。 - 更新:
。
重复上述步骤直至满足终止准则。
第 2 步称为直线搜索,因为选择步长
精确直线搜索
实际中有时使用的一种直线搜索方法是精确直线搜索(exact line search),即选取
当该一维极小化问题的代价比计算搜索方向本身的代价小时,可以采用精确直线搜索。某些特殊情形下沿射线的极小点可以解析求出,其他情形也可以高效地数值求解。
回溯直线搜索
实践中使用的直线搜索大多数是不精确的:步长的选取只是近似地最小化
算法 9.2(回溯直线搜索) 给定
令
之所以称为回溯,是因为它从单位步长开始,然后按因子
这表明回溯直线搜索最终必然终止。常数
回溯终止不等式
第一种情形对应单位步长本身就满足回溯条件(即
当
参数
![]()
上图由下面的 TikZ 代码编译而来:
\definecolor{cblue}{RGB}{31,119,180}
\definecolor{cred}{RGB}{214,39,40}
\definecolor{cgreen}{RGB}{44,160,44}
\definecolor{corange}{RGB}{255,127,14}
\definecolor{cpurple}{RGB}{148,103,189}
\definecolor{cbrown}{RGB}{140,86,75}
\definecolor{cpink}{RGB}{227,119,194}
\definecolor{cgray}{RGB}{127,127,127}
\begin{tikzpicture}[x=1cm,y=1cm,>=stealth,line cap=round,line join=round,scale=1.5]
\draw[->,color=black!60] (-0.08,1.2) -- (1.5,1.2) node[below] {$t$};
\draw[->,color=black!60] (0,1.2) -- (0,4.35) node[left] {$f(x+t\Delta x)$};
\draw[cred,very thick,domain=0:1.15,samples=60] plot (\x,{2.5-3*\x+4*\x*\x});
\draw[cblue,thick,dashed,domain=0:0.46] plot (\x,{2.5-3*\x});
\draw[cgreen,thick,dashed,domain=0:1.34] plot (\x,{2.5-0.75*\x});
\draw[color=black!55,dotted] (1,1.2) -- (1,3.5);
\draw[color=black!55,dotted] (0.5,1.2) -- (0.5,2.0);
\draw[color=black!55,dotted] (0.25,1.2) -- (0.25,2.0);
\fill[cred] (1,3.5) circle (1.7pt);
\fill[cred] (0.5,2.0) circle (1.7pt);
\fill[cgreen] (0.25,2.0) circle (2.2pt);
\node[below=2pt] at (1,1.2) {$1$};
\node[below=2pt] at (0.5,1.2) {$\beta$};
\node[below=2pt] at (0.25,1.2) {$\beta^2$};
\node[anchor=west] at (0.8,4.1) {\textcolor{cred}{$f(x+t\Delta x)$}};
\node[anchor=north] at (0.35,0.88) {\textcolor{cblue}{$f(x)+t\nabla f(x)^{\top}\Delta x$}};
\node[anchor=west] at (1.45,1.58) {\textcolor{cgreen}{$f(x)+\alpha t\nabla f(x)^{\top}\Delta x$}};
\node[anchor=east] at (-0.06,3.35) {\textcolor{cgreen}{$t=\beta^2$}};
\draw[->,cgreen] (-0.04,3.28) -- (0.22,2.12);
\node[anchor=east] at (0,2.5) {$f(x)$};
\node[anchor=south] at (1.22,1.7) {\textcolor{cgreen}{$\alpha$}};
\end{tikzpicture}