.
Fitting a regression model Plotting this line with the scatter plot results in the figure you see here. import numpy as np from sklearn import linear_model reg = linear_model.LinearRegression() reg.fit(X_rooms, y) reg.score(X, y) # Regression coefficients reg.coef_ reg.intercept_ prediction_space =