Timeline for Logistic Regression: Scikit Learn vs Statsmodels
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 4, 2021 at 2:29 | comment | added | rmwenz |
@desertnaut you're right statsmodels doesn't include the intercept by default. Here the design matrix X returned by dmatrices includes a constant column of 1's (see output of X.head() ). Then even though both the scikit and statsmodels estimators are fit with no explicit instruction for an intercept (the former through intercept=False , the latter by default) both models effectively have an intercept, which can be seen by inspecting the outputs carefully.
|
|
May 26, 2020 at 12:44 | comment | added | desertnaut | It is the exact opposite actually - statsmodels does not include the intercept by default. See the SO threads Coefficients for Logistic Regression scikit-learn vs statsmodels and scikit-learn & statsmodels - which R-squared is correct?, as well as the answer below. | |
Sep 7, 2017 at 19:11 | review | Late answers | |||
Sep 7, 2017 at 19:23 | |||||
Sep 7, 2017 at 19:01 | review | First posts | |||
Sep 7, 2017 at 19:34 | |||||
Sep 7, 2017 at 18:52 | history | answered | brian dalessandro | CC BY-SA 3.0 |