1. 为什么负梯度方向是函数下降最快的方向
f(x)f (\mathbf {x})f(x)是 target function,x0\mathbf{x}_0x0是 start point。
在 x0\mathbf {x}_0x0 处做写出一阶泰勒展式:
f(x)=f(x0)+∇f(x0)⋅(x−x0)+O(∥x−x0∥2)
f (\mathbf {x})=f (\mathbf {x}_0)+\nabla f (\mathbf {x}_0) \cdot (\mathbf {x}-\mathbf {x}_0)+O (\lVert \mathbf {x}-\mathbf {x}_0 \rVert^2)
f(x)=f(x0)+∇f(x0)⋅(x−x0)+O(∥x−x0∥2)
当 ∥x−x0∥2\lVert \mathbf {x}-\mathbf {x}_0 \rVert^2∥x−x0∥2 足够小时,有
f(x0)−f(x)=−∇f(x0)⋅(x−x0)
f (\mathbf {x}_0)-f (\mathbf {x})=-\nabla f (\mathbf {x}_0) \cdot (\mathbf {x}-\mathbf {x}_0)
f(x0)−f(x)=−∇f(x0)⋅(x−x0)
等式右边是 −∇f(x0)-\nabla f (\mathbf {x}_0)−∇f(x0) 和 (x−x0)(\mathbf {x}-\mathbf {x}_0)(x−x0) 的内积,我们知道当这两个向量同向时,内积最大,此时函数值下降的最多,于是可以得出结论:负梯度方向是函数下降最快的方向。