Gradient Descent
Gradient Descent
optimize atonofthings
youto do is
decent allows
Whatgradient
Firstletssee howtonormallyfindleastsquares
Findintercept
upon
ex
thisistheresidual
g
so f
as
Height
Weight
3 Plugintotheformula
Y
Predicted value intercept slope value
4Repeatfor otherdatapoints
all
justforfunletsdotthese on a graph
Now
ois.rs
f ooo ooo
ooo
Intercept
you
Butisthatthebestwe cando
eat
residuals
Thesearetheplugins
je
ooo
ho
ag if
g ga
ooo
tog
is ao B
Thisiswhere theconcentrationshouldbe
Intercept
Thisisineffectivesincethereisanequalconcentration of plugins
Nowletsseehowyou'ddoit withgradientdecent
Whatmakes gradientdecentunique
The
farther
away
fromthe mostoptimalpoint andwill then concentratemorepoint thecloser
oooo oooo
E Bo
I
Intercept
Thisallows it tobemuchmoreefficient
FindInterceptwithGradientDecent
ex
13 Iintercept10.64 ID
15 intercept10.64 3D
15 Iintercept10.64 512
17 intercept10.64 6 5
18 intercept10.64 8D
since we caneasily
0 I 2
Intercept
givenvalueforthe intercept
d
intercept
13 Iintercept to64 ID
d I
intercept15 intercept to 64.3112
I will
I
intercept15 intercept to64.5112
goitehaownetofankffkoeasoghuiyofthth.se
d
17 interest10.64 615
dintercept
d I
intercept18 intercept to64 8D
d
dintercept 13 Iintercept10.64
1112
Tosolvethis weneedtoapplythechainrule
Step1 Movethesquaretothefront
Step2 Multiplythatbythederivativeofthestuffinsidetheparenthesis
4
Step Simplify Combinelitreterms
ex
d I
intercept13 intercept
10.64ID 213 intercept10.64 IDI
d 3
dintercept
intercept10.64 l 213 intercept10.64 ID
d 1 finalequation
dintercept l Il intercept I
t dintercept l Il intercept I x
Whatwe'relookingforis aslope of 0
Note If
In
we wereusingleastsquares we wouldjustfindwhereslopeis0 theotherhandgradient
decentwillfind theminimal valuefroman initial
guess