image_output_1.png
from sklearn import metrics

from sklearn import metrics

from sklearn.linear_model import LinearRegression

from sklearn.linear_model import LinearRegression

import numpy as np # linear algebra

from sklearn.linear_model import LinearRegression
regressor = LinearRegression()
regressor.fit(X_train, y_train)
y_pred = regressor.predict(X_test)

regressor.fit(X_train, y_train)

y_pred = regressor.predict(X_test)

from sklearn import metrics

from sklearn import metrics
metrics.r2_score(y_test, y_pred)