Lecture 2 Gradient descent

#This was a lecture of Andrew NG on Couresera websiteMachine Learning of Stanford University.#
#This was a note noted by WONG Zinhoo, Reproduced please specify the Source and the original link#
                        Lecture 2 Gradient descent

Algorithm Ideal

We already knew that the  graphic function described the distance between the line and the points in different graphic condition. 
We want find out the best line which conform the samples best, to accomplish this aim we just need to make the J function minimum.
graphic
This is the basic methods:
graphic
As pic<1> show, the red parts are the Maxima peaks and the Minimum is in the valley.
graphic
                   Pic<1>

Gradient descent algorithm

graphic
All the  graphic should be simultaneous updated, that means that we changed the  graphic group by group rather than by single.
Function analysis:
graphic
when the original  graphic is in the slope:
                 graphic
Theorem: the gradient’s direction is same to the normal direction, and the length of the gradient equal to the rate of the change.

Base on the theorem of gradient the slope steeper the length of gradient much longer; and the value of  graphic become smaller. 
With this process the new  graphic become smaller:
graphic
Because                the value of gradient   ∝  θ
So gradient become smaller: 
                                                 graphic
Repeat this process, the  graphic will go to the local bottom (local minimum).

More simple condition: the single  θ condition:
                            graphic
As we approach a local minimum, gradient descent will automatically take smaller steps. So, no need to decrease α over time: 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值