For me the most important lesson should be the last one on week 5, and one image can show what we are doning by trainning a Nearal Network : Looking for parameters which minimize the cost function.
Image from Coursera
Steps are :
- initialize the weights (thetas) randomly
- Forwardpropagation: compute from X to Y
- Cost function
- Backprobagation : compute deltas ( partial derivatives) dCost_function/dTheta
- Gradient checking to confirm dCost_function/dTheta is correct, then disable this check
- Gradient Decent or built-in optimization function to minimize the Cost Function with thetas
It's very similar to a Curve Calibration which the theta is ZC and target is not minimize but find the zero NPV with Newton raphson.
So what's the difference :
Newton raphson VS Gradient Decent
- objectivf :
- N.R. is for reaching the ZERO POINT
- G.D. is for reaching the MIN POINT (bottom)
- User's input
- N.R. just need partial derivitives (decent to zero point, then next iteration)
- G.D. need a step lenght (decent a step lenght, then next iteration)
- Termination condition
- Both them should define a MAX iteration number as termination condition
- N.R. could have a tolorence for how closing to ZERO
- G.D. could have a tolorence for how much minimized comparing to last iteration.

No comments:
Post a Comment