GD Algo
GD Algo
Objective
Gradient descent algorithm is an iterative process that takes us to the
minimum of a function
What is Gradient Descent?
Let’s say you are playing a game where the players are at the top of a mountain, and they are asked to
reach the lowest point of the mountain. Additionally, they are blindfolded. So, what approach do you
think would make you reach the lake?
Gradient descent was originally proposed by CAUCHY in 1847. It is also known as steepest descent.
Gradient descent is an iterative optimization algorithm for finding the local
minimum of a function.
The goal of the gradient descent algorithm is to minimize the given function (say cost
function). To achieve this goal, it performs two steps iteratively:
1.Compute the gradient (slope), the first order derivative of the function at that point
1.Make a step (move) in the direction opposite to the gradient, opposite direction of
slope increase from the current point by alpha times the gradient at that point
Limitations
Gradient descent
Gradient descent is a general-purpose algorithm that numerically finds minima of multivariable functions.
1. One of its limitations is that it only finds local minima (rather than the global minimum). As
soon as the algorithm finds some point that's at a local minimum, it will never escape as long
as the step size doesn't exceed the size of the ditch.
2. Another limitation of gradient descent concerns the step size. A good step size
moves toward the minimum rapidly, each step making substantial progress.
If the step size is too large, however, we may never converge to a local
minimum because we overshoot it every time.
3. A final limitation is that gradient descent only works when our function is differentiable
everywhere. Otherwise we might come to a point where the gradient isn't defined, and then
we can't use our update formula.
Function requirements
Gradient descent algorithm does not work for all functions. There are two specific
requirements. A function has to be:
● differentiable
● convex
Differentiable: If a function is differentiable it has a derivative for each point
in its domain
https://towardsdatascience.com/gradient-descent-algorithm-a-deep-dive-cf04e811
5f21