Use-case

It is used to find the smallest cost function for a regression. So that the regression gives a fairly accurate approximation of the data set.

Theory

Hypothesis Function

Where,

  • Parameters guessed by the Hypothesis function through regression
  • Domain

Example

center Cost/Loss Function: Mean Squared Error

Where, Number of data points.

The cost function is computed for all the guess values can be visualized as follows. Visually, the point with the lowest cost function can be identified. However, it is not feasible to map the cost function to every possible guess value of . center Gradient algorithm is then used to find a path to a minima of the cost function.

This gives the smallest value of for a given because we know that the gradient points to the direction of the steepest slope. Where step size learning rate

Repeat until convergence