TVradionewspapersalespython线性回归Y_pred=l.predict(x_test)plt.plot(range(len(Y_pred)),Y_pred,'red',linewidth=2.5,label='predictdata')plt.plot(range(len(y_test)),y_test,'green',label='testdata')plt.legend(loc=2)plt.show()