Basically, the gradient descent algorithm is a general optimization technique and can be used to optimize any cost function. It is often used when the optimal point cannot be estimated in a closed form solution.
So, let's say we want to minimize the cost function. What ends in the gradient descent is that we start at some random starting point and we try to move in the direction of the βgradientβ in order to reduce the cost function. We step by step until there is no cost reduction. At this time, we are at the minimum point. To make it easier to understand, imagine a bowl and bowl. If we drop the ball from some starting point on the bowl, it will move until it is installed at the bottom of the bowl.
Since gradient descent is a general algorithm, it can be applied to any problem that requires optimization of the cost function. The regression problem often uses the cost function, which is the root mean square error (MSE). The search for a closed-form solution requires inverting the matrix, which in most cases is poorly conditioned (the determinant is very close to zero and, therefore, does not provide a reliable inverse matrix). To get around this problem, people often use the gradient descent approach to find a solution that does not suffer from a bad conditional problem.
source share