text_html_output_1.png
from sklearn import metrics

from sklearn.linear_model import LinearRegression

import numpy as np

regressor = LinearRegression()
regressor.fit(x_train, y_train)

y_pred = regressor.predict(x_test)
y_pred

print('mean absolute error: ', metrics.mean_absolute_error(y_test, y_pred))
print('mean squared_error: ', metrics.mean_squared_error(y_test, y_pred))
print('root mean absolte error: ', np.sqrt(metrics.mean_absolute_error(y_test, y_pred)))
print('r2score:', metrics.r2_score(y_test, y_pred))