Machine Learning, Python, Linear Regression, Gradient Descent, Regression Analysis.
- y) / len(y) # Update the parameters theta = theta - lr * grad # Compute and store the cost function value cost_list[i] = cost_function(X, y, theta) theta_list[i,:] = theta.reshape((1,3)) return theta, cost_list, theta_list # generate dummy data X1 = 2 * np.random.rand(100, 1) X2 = 3 *