Linear Regression, Data Science, Modeling, Ordinary Least Square, Regression.
best_betas = matmul(c, y) best_betas_one_line = matmul(matmul(inv(matmul(x.T, x)), x.T), y) a is the variance/covariance matrix. Covariance is on the diagonal and variance is on the non-diagonal. b is the inverse of that matrix — it essentially allows us to divide. c is our independent variables