🛠️ Scheduled Maintenance | We’ll be undergoing scheduled maintenance and upgrades between 00:00 PST Jan 26th until 00:00 PST Jan 28th. There may be brief interruption of services in that period. We apologize for the inconvenience.

×
The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

Coefficients differ in statsmodels and sklearn

Coefficients differ in statsmodels and sklearn

1
Vote
1
Answer

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 Answer

365 Team
0
Votes

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