So far, we have understood how the gradient descent algorithm finds the optimal parameters of the model. In this section, we will understand how we can use gradient descent in linear regression and find the optimal parameter.
The equation of a simple linear regression can be expressed as follows:
Thus, we have two parameters, and . Now, we will see how can we use gradient descent and find the optimal values for these two parameters.