Machine Learning, Linear Regression, Gradient Descent, Python, Stochastic Gradient.
g_b1 Now I start the iterations: gradient_vector_length = [] # inital stepsize, b0, b1, gradient b0 and gradient b1 at iteration 0 stepsize = 0.01 b0=0; b1=0 g_b0 = 1; g_b1 = 1 # while not converge (tolerance is 0.0001) while np.sqrt(g_b0**2 + g_b1**2) > 0.0001: # get b0 and b1 at t+1 b0, b1, g_b0,