1
votes

Good night, community!

I have a simple question whose answer may not be as simple:

How can I show the independent variable coefficients of a Logistic regression model using Python's SciKit Learn?

2

2 Answers

1
votes

if model is your sklearn.linear_model.LogisticRegression then the coeffecients are accessible in model.coef_

1
votes

Only completing the answer above in case you want to be able to build full the linear regression equation. You woul need not only the coefficients of independent variables but also the intercept. You can access these values in the following way:

  • Coefficients: model.coef_
  • Intercept: model.intercept_