Machine Learning, Python, Linear Regression, Gradient Descent, Regression Analysis.
plt.xlabel('Iterations') plt.ylabel('Cost') plt.show() Cost decreases over iterations. Image by the author. # regression line plt.scatter(X, y) plt.plot(X, X_b.dot(theta), color='r') plt.xlabel('X') plt.ylabel('y') Regression line. Image by the author. We can also plot the gradient descent over the