0

We have observed that stats model s logistic regression dosent shows where as scikit learn shows intercept in model summary. if stats model dosent consider intercept while model building. How it builds model.

From my understanding while building logistic model algorithm learns beta values and intercept and create equation

Prediction = logisticfunc(B0x0 + B1x1 + B2x2 +B3x3 + . . . + Bn xn + intercept)

Mangesh Divate
  • 97
  • 1
  • 12
  • Statsmodels takes the design matrix as given by the user and does not add a constant. When formulas are used, then a constant is added by default and any required transformations specified in the formula are performed. e.g. https://stackoverflow.com/questions/24723339/ols-of-statsmodels-does-not-work-with-inversely-proportional-data – Josef Jun 27 '21 at 18:59
  • and https://stackoverflow.com/questions/50428825/different-coefficients-scikit-learn-vs-statsmodels-logistic-regression for comparison statsmodels, sklearn for logit – Josef Jun 27 '21 at 19:01

0 Answers0