凸优化——负梯度

一、方向导数
  导数描述了函数随自变量变化的变化率。而当函数为多元函数时,取 R n \bm{R}^{n} Rn上的多元函数 f ( x ) f(\bm{x}) f(x),其在不同方向通常有不同的变化率,因此,在描述多元函数的导数时,不仅要描述其变化率的幅值,还要描述其方向。
  定义函数 f f f定义域上一点 p 0 \bm{p}_0 p0 p 1 \bm{p}_1 p1,向量 l \bm{l} l是一个方向与 p = p 1 − p 0 \bm{p} = \bm{p}_1 - \bm{p}_0 p=p1p0一致的非零向量,用以描述 p \bm{p} p的方向。若极限 l i m ∣ p → 0 ∣ ( f ( p 1 ) − f ( p 0 ) / ∣ p ∣ ) lim_{|\bm{p} \rightarrow 0|} (f(\bm{p}_1) - f(\bm{p}_0) / |\bm{p}|) limp0(f(p1)f(p0)/p)存在,则称其为函数 f f f p 0 \bm{p_0} p0沿着 l \bm{l} l的方向导数,记为 ∂ f / ∂ l ∣ p 0 = l i m ∣ p → 0 ∣ ( f ( p 1 ) − f ( p 0 ) / ∣ p ∣ ) ∂f/∂\bm{l}|_{\bm{p}_0} = lim_{|\bm{p} \rightarrow 0|} (f(\bm{p}_1) - f(\bm{p}_0) / |\bm{p}|) f/lp0=limp0(f(p1)f(p0)/p)其描述了函数 f f f p 0 \bm{p}_0 p0沿着 l \bm{l} l方向的变化率。


二、梯度
  梯度定义为 ▽ f = ( ∂ f / ∂ x 1 , . . . , ∂ f / ∂ x n ) \bigtriangledown f = (∂f/∂x_1, ..., ∂f/∂x_n) f=(f/x1,...,f/xn)其每个分量描述了 f f f沿着每个坐标轴的变化率,根据多维泰勒展开 f ( x ) = f ( x k ) + [ ▽ f ( x k ) ] T ( x − x k ) + 1 / 2 ! ⋅ ( x − x k ) T H ( x k ) ( x − x k ) f(\bm{x}) = f(\bm{x}_k) + [\bigtriangledown f(\bm{x}_k)]^T(\bm{x} - \bm{x}_k) + 1/2!·(\bm{x} - \bm{x}_k)^TH(\bm{x}_k)(\bm{x} - \bm{x}_k) f(x)=f(xk)+[f(xk)]T(xxk)+1/2!(xxk)TH(xk)(xxk)
f ( p 1 ) = f ( p 0 ) + [ ▽ f ∣ p 0 ] T p + o ( ∣ p ∣ ) f(\bm{p}_1) = f(\bm{p}_0) + [\bigtriangledown f|_{\bm{p}_0}]^T\bm{p} + o(|\bm{p}|) f(p1)=f(p0)+[fp0]Tp+o(p) p \bm{p} p取极限,有 l i m ∣ p ∣ → 0 ( f ( p 1 ) − f ( p 0 ) ) / ∣ p ∣ = l i m ∣ p ∣ → 0 ( [ ▽ f ∣ p 0 ] T p + o ( ∣ p ∣ ) ) / ∣ p ∣ = l i m ∣ p ∣ → 0 [ ▽ f ∣ p 0 ] T p / ∣ p ∣ = [ ▽ f ∣ p 0 ] T l i m ∣ p ∣ → 0 p / ∣ p ∣ = [ ▽ f ∣ p 0 ] T p / ∣ p ∣ \begin{aligned} lim_{|\bm{p}| \rightarrow 0} (f(\bm{p}_1) -f(\bm{p}_0))/|\bm{p}| &= lim_{|\bm{p}| \rightarrow 0} ([\bigtriangledown f|_{\bm{p}_0}]^T\bm{p} + o(|\bm{p}|))/|\bm{p}| \\&= lim_{|\bm{p}| \rightarrow 0} [\bigtriangledown f|_{\bm{p}_0}]^T\bm{p}/|\bm{p}| \\&= [\bigtriangledown f|_{\bm{p}_0}]^T lim_{|\bm{p}| \rightarrow 0} \bm{p}/|\bm{p}| \\&=[\bigtriangledown f|_{\bm{p}_0}]^T \bm{p}/|\bm{p}| \end{aligned} limp0(f(p1)f(p0))/p=limp0([fp0]Tp+o(p))/p=limp0[fp0]Tp/p=[fp0]Tlimp0p/p=[fp0]Tp/p ∂ f / ∂ l ∣ p 0 = [ ▽ f ∣ p 0 ] T p / ∣ p ∣ ∂f/∂\bm{l}|_{\bm{p}_0} = [\bigtriangledown f|_{\bm{p}_0}]^T \bm{p}/|\bm{p}| f/lp0=[fp0]Tp/p


三、内积
  在上述式中, p / ∣ p ∣ \bm{p}/|\bm{p}| p/p代表了 l \bm{l} l的单位向量,可以描述为方向余弦,形如 p / ∣ p ∣ = ( c o s ( θ 1 ) , . . . , c o s ( θ n ) ) \bm{p}/|\bm{p}| = (cos(\theta_1), ..., cos(\theta_n)) p/p=(cos(θ1),...,cos(θn))表征该单位向量的方向,且显然有 ∑ i = 1 n c o s 2 ( θ i ) = 1 \sum_{i=1}^n cos^2(\theta_i) = 1 i=1ncos2(θi)=1。根据向量内积,有 x y = ∣ x ∣ ∣ y ∣ c o s ( ⟨ x , y ⟩ ) \bm{x}\bm{y} = |\bm{x}||\bm{y}|cos(\lang\bm{x}, \bm{y}\rang) xy=xycos(x,y)那么 ∂ f / ∂ l ∣ p 0 = ∂ f / ∂ x 1 ∣ p 0 ⋅ c o s ( θ 1 ) + . . . + ∂ f / ∂ x n ∣ p 0 ⋅ c o s ( θ n ) = ∣ ▽ f ∣ p 0 ∣ ⋅ c o s ( ⟨ ▽ f ∣ p 0 , l ⟩ ) ≤ ∣ ▽ f ∣ p 0 ∣ \begin{aligned} ∂f/∂\bm{l}|_{\bm{p}_0} &= ∂f/∂x_1|_{\bm{p}_0}·cos(\theta_1) + ... + ∂f/∂x_n|_{\bm{p}_0}·cos(\theta_n) \\&= |\bigtriangledown f|_{\bm{p}_0}|·cos(\lang\bigtriangledown f|_{\bm{p}_0}, \bm{l}\rang) \\&\le |\bigtriangledown f|_{\bm{p}_0}| \end{aligned} f/lp0=f/x1p0cos(θ1)+...+f/xnp0cos(θn)=fp0cos(fp0,l)fp0当梯度与 l \bm{l} l的方向一致时,函数 f f f p 0 \bm{p}_0 p0沿着 l \bm{l} l方向的变化率最大,即当函数沿着梯度方向前进,函数增长速率最大。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值