Gradient Descent and Cost Function
Gradient Descent and Cost Function
FUNCTION
RECAP OF BASIC CONCEPTS
SLOPE
RECAP OF BASIC CONCEPTS
17
MEAN SQUARE ERROR
18
MEAN SQUARE ERROR
19
MEAN SQUARE ERROR
20
GRADIENT DESCENT
22
We start from any value of
m and b, usually 0.
23
GRADIENT DESCENT
If we take fixed size steps, we can miss global
minima.
The gradient descent will never converge.
24
GRADIENT DESCENT
Varying step sizes can help to achieve global minima.
25
GRADIENT DESCENT
Varying step sizes can be achieved by calculating slope at
each point.
Partial derivative/Slope will tell in which direction we
need to go.
26
GRADIENT DESCENT
Learning rate decides the step size.
GRADIENT DESCENT
28
GRADIENT DESCENT
29
GRADIENT DESCENT
30
GRADIENT DESCENT
31
GRADIENT DESCENT
θ1
θ1
33
GRADIENT DESCENT
θ1
34
GRADIENT DESCENT
θ1
35