Machine Learning, Python, Linear Regression, Gradient Descent, Regression Analysis.
cost function contours. # contour plot theta0 = np.linspace(-5, 5, 100) theta1 = np.linspace(-5, 5, 100) J_vals = np.zeros((len(theta0), len(theta1))) for i, t0 in enumerate(theta0): for j, t1 in enumerate(theta1): J_vals[i, j] = cost_function(X_b, y, np.array([[t0], [t1]])) plt.contour(theta0,