Machine Learning, Data Science, Linear Regression, Gradient Descent, Numpy.
given by the formula: Image by Author What the formula tells us is that we actually want to minimize the average squared distance of each point from the line. In the formula y_i are the known outputs and since ŷ_i is given by the line we want to find ŷ_i= mX +q, in order to minimize this function