Machine Learning, Linear Regression, Gradient Descent, Python, Stochastic Gradient.
(sum(y_norm*x_norm) - sum(y_norm)*sum(x_norm)/n)/(sum([t**2 for t in x_norm]) - sum(x_norm)*sum(x_norm)/n) print(b1) b0 = (sum(y_norm) - b1*sum(x_norm))/n print(b0) b1 = 0.622 and b0 = 0.058 Note here I normalized y and x using their vector length. Feature scaling is importance for gradient