reg.fit(x,y) gave me different answer over google colab
i have used reg.get_params() as suggested in Simple linear regression lecture. But the output whichi got is different in google colab:
{'copy_X': True, 'fit_intercept': True, 'n_jobs': None, 'positive': False}
is something m I missing please suggest.
Hey Ashutosh,
Thank you for reaching out.
The version of sklearn
used in the course is 0.19. In that version, the parameters of the LinearRegression
class were:
- fit_intercept
, defaulting to True
,
- normalize
, defaulting to False
,
- copy_X
, defaulting to True
,
- and n_jobs
, defaulting to 1
.
These are the values that you see in the lesson.
In subsequent sklearn
versions, however, the parameters changed to the following:
- fit_intercept
, defaulting to True
,
- copy_X
, defaulting to True
,
- n_jobs
, defaulting to None
,
- and positive
, defaulting to False
.
https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html
These are the values that you obtain. There is nothing to worry about and it's great that you are using a recent sklearn
version.
Kind regards,
365 Hristina