5/17/2023 0 Comments Gradient math![]() Also, the tangent gives us a sense of the steepness of the slope. In the same figure, if we draw a tangent at the green point, we know that if we are moving upwards, we are moving away from the minima and vice versa. We will talk about this in more detail in the latter part of the article. So, if we can compute this tangent line, we might compute the desired direction to reach the minima. The slope is described by drawing a tangent line to the graph at the point. A derivative is a term that comes from calculus and is calculated as the slope of the graph at a particular point. Gradient Descent Algorithm helps us to make these decisions efficiently and effectively with the use of derivatives. which way to go and how big a step to take. If you decide which way to go, you might take a bigger step or a little step to reach your destination.Įssentially, there are two things that you should know to reach the minima, i.e.In a Cartesian coordinate system, this is an equation for a parabola and can be graphically represented as : A gradient in calculus and algebra can be defined as: A differential operator applied to a vector-valued function to yield a vector whose components are the partial derivatives of the function with respect to its variables. If we look carefully, our Cost function is of the form Y = X². Since we want the lowest error value, we want those‘ m’ and ‘ b’ values that give the smallest possible error. This is because a lower error between the actual and predicted values signifies that the algorithm has done an excellent job learning. ![]() The goal of any Machine Learning Algorithm is to minimize the Cost Function. Also, the squared differences increase the error distance, thus, making the bad predictions more pronounced than the good ones. gradient formula above, and then choose either point to substitute into the straight line equation with this gradient. Indeed, to find that line we need to compute the first derivative of the Cost function, and it is much harder to compute the derivative of absolute values than squared values. ![]() Why do we take the squared differences and simply not the absolute differences? Because the squared differences make it easier to derive a regression line. ![]()
0 Comments
Leave a Reply. |