Gradient Descent
In step3,we have to solve the following optimization:
- 找到使得Loss Function最小的parameter
Tuning your learning rates
学习率 太大太小均不可以
Adaptive learning Rates
Adagrad
给每一个参数一个不同的learning rate
过去所有计算过的微分值的均方根(即所有微分值的平方再平均再开根号)
Adagrad 考虑的是反差
- 直观解释:
- 正式解释:
- 两个参数时
多个参数时
多个参数时,需要考虑其它参数对当前参数的影响,虽然这个参数的gradient可能很大,但是实际情况应该是选择小的step,大的step可能导致跳过最佳位置。
Adagrad使用以及计算出来的一次微分值的均方根来代替二次微分的计算(节省了计算开销)
Stochastic Gradient Descent(随机梯度下降)
原理的GD是计算完所有的update一次参数
SGD是看到一个examlpe就update一次参数,如果有20个example就update20此参数
Feature Scaling(特征缩放,特征归一化)
怎么做?
Gradient Descent Theory
Each time we update the parameters, we obtain that makes L(
) smaller
上述陈述是错的。。。(不一定)
Formal Derivation
Taylor Series
Back to Fromal Derivation
More Limitation of Gradient Descent
可能会卡在一个局部最优解;也可能卡在一个微分等于0的点;也可能算出的微分值很小你就停下了,但实际离最优点还有一段距离