plt.grid(b=None) plt.subplot(2, 2, 1) plt.plot(X_test, f(X_test), "b") plt.scatter(X_train, y_train, c="b", s=20) plt.plot(X_test, d_predict, "g", lw=2) plt.title("Decision Tree, MSE = %.2f" % np.sum((y_test - d_predict) ** 2))