Gradient Descent, Linear Regression, Machine Learning.
Gradient Descent for a single feature ''' m, b = 0.33, 0.48 # initial parameters log, mse = [], [] # lists to store learning process for _ in range(epoch): indexes = np.random.randint(0, len(X), batch_size) # random sample Xs = np.take(X, indexes) ys = np.take(y, indexes) N = len(Xs) f = ys - (m*Xs