本文摘自:
http://blog.csdn.net/itplus/article/details/21896453
https://www.cnblogs.com/ljy2013/p/5129294.html?from=singlemessage&isappinstalled=0
优化求解损失函数是机器学习最重要的步骤,往往求解函数没有解析解,而是通过迭代优化方法寻找全局最优。
介绍最常用的方法LBFGS,不过要先看看GD、DFP和BFGS算法,然后再理解LBFGS会更清晰。
先看下最基础的梯度下降法(Gradient Descent)
为了保证函数能够一直沿着梯度下降,则
那么我们只需要保证
就有
所以有了我们最常用的梯度下降法公式(加上步长控制)
但是梯度下降是只用了一次导数,所以对二次函数或者高阶求解速度较慢,下面我们介绍二次收敛性的方法






从这里我们可以看出:要想迭代出Xk+1,就只需要计算Dk+1即可。DFP算法是对Dk+1的一个近似计算的算法。BFGS算法是直接近似计算海森矩阵,用Bk+1表示。

这里D_k的假设可以从一个单位矩阵不断优化得到,有点类似MCMC里面,从一个均匀分布可以得到任何一个分布。

这里公式sk=\lambda dk
dk=-H_k^{-1}g_k=-D_K*g_k







网友评论