text_html_output_1.png
from sklearn.linear_model import LinearRegression

from sklearn.metrics import mean_absolute_error,mean_squared_error,r2_score

from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(train_x, train_y)

predict_train = model.predict(train_x)
predict_test = model.predict(test_x)

train_MSE = mean_squared_error(train_y, predict_train)
test_MSE = mean_squared_error(test_y, predict_test)

print('train_MSE: ', train_MSE)
print('test_MSE: ', test_MSE)