O'Reilly logo
  • Anujay Saraf thinks this is interesting:

from sklearn.linear_model import LinearRegression

>>> lr = LinearRegression(normalize=True)
>>> lr.fit(X.reshape((-1, 1)), Y.reshape((-1, 1)))
>>> lr.intercept_
array([ 5.500572])
>>> lr.coef_
array([[ 2.53688672]])

From

Cover of Machine Learning Algorithms

Note

X ,Y are not defined