Open hjkkkl opened 1 month ago
y_hat_train = lin_model.predict(X_train) plt.scatter(y_train, y_hat_train) xy_range = [40, 100] plt.plot(sy_range, xy_range)
--
y_hat_test = lin_model.predict(X_test)
from sklearn.metrics import mean_squared_error print('Mean squared error:', mean_squared_error(y_test, y_hat_test)
y_hat_train = lin_model.predict(X_train) plt.scatter(y_train, y_hat_train) xy_range = [40, 100] plt.plot(sy_range, xy_range)
--
y_hat_test = lin_model.predict(X_test)
plt.scatter(y_test, y_hat_test) plt.plot(sy_range, xy_range)
from sklearn.metrics import mean_squared_error print('Mean squared error:', mean_squared_error(y_test, y_hat_test)