Coefficients differ in statsmodels and sklearn
I decided to do feature scaling exercise in ML (linear regression) part of the course and used both stats models and sklearn for practice. However, I obtained different coefficients, even though I got the same predicted values. Is it due to scaling or did I do something wrong with coefficients?
1 answers ( 0 marked as helpful)
Hi Emin,
This is a great observation!
In fact, the two libraries are using different methods to estimate the regression line, therefore, resulting in different coefficients!
Best,
The 365 Team