Linear Regression, Data Science, Modeling, Ordinary Least Square, Regression.
is relevant in the following step. term_1 = matmul(-2 * x.T, y) term_2 = matmul(matmul(2 * x.T, x), beta) derivative = term_1 + term_2 The above python code shows the formula for our sum of squared residuals derivative. If you’re curious how we got this formulation, check out the matrix notation