Cost Function, Gradient Descent.
Initialize parameters theta_initial = np.random.randn(2, 1) # Set hyperparameters learning_rate = 0.01 n_iterations = 1000 # Run gradient descent theta_final, costs = gradient_descent(theta_initial, X_b, y, learning_rate, n_iterations) # Plot the data points and decision boundary plt.scatter(X, y)