Линия регрессии участка от Sklearn

# Import LinearRegression
from sklearn.linear_model import LinearRegression
# Create the regressor: reg
reg = LinearRegression()
# Create the prediction space
prediction_space = np.linspace(min(feature), max(feature)).reshape(-1,1)
# Compute predictions over the prediction space: y_pred
y_pred = reg.predict(prediction_space)
# Plot regression line
plt.plot(prediction_space, y_pred, color='  ', linewidth=3)
plt.show()
josh.ipynb