text_plain_output_1.png
from sklearn.linear_model import LinearRegression

import matplotlib.pyplot as plt

import matplotlib.pyplot as plt

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

y_pred = regressor.predict(X_test)

plt.scatter(X_train, y_train, color='Red')
plt.plot(X_train, regressor.predict(X_train), color='Blue')
plt.title('Hypothesis over training data')
plt.xlabel('X')
plt.ylabel('y')
plt.show()