In this notebook, the algorithm of the Batch Gradient Descent for Linear Regression is implemented. Initially, we define the linear regression function that is used to generate random data. This dataset is then used to fit the regression line. Afterwards, we implement the Gradient Descent model and evaluate it with respect to the cost (loss) function. Finally, we visualize the Gradient Descent method in an interactive plot.
The main aim of this notebook is to present how the Batch Gradient Descent algorithm can be used to fit a regression line to a set of data by calculating the coefficients (intercept and slope) of the regression equation.