Deep Learning, Linear Algebra, Neural Networks, Machine Learning, Artificial Intelligence.
predictions X_new = np.array([[0], [2]]) X_new_b = np.c_[np.ones((2, 1)), X_new] y_predict = X_new_b.dot(theta_best) # Plot the data and regression line plt.scatter(X, y) plt.plot(X_new, y_predict, "r-", linewidth=2, label="Predictions") plt.xlabel("X") plt.ylabel("y") plt.legend(loc="upper left")