Reputation: 83
Based on the Logistic Regression function:
I'm trying to extract the following values from my model in scikit-learn.
Where is the intercept and
is the regression coefficient. (as per the wikipedia)
Now, I think I can get by doing
model.intercept_
but I've been struggling to get . Any ideas?
Upvotes: 3
Views: 9016
Reputation: 1562
You can access the coefficient of the features using model.coef_
.
It gives a list of values that corresponds to the values beta1
, beta2
and so on. The size of the list depends on the amount of explanatory variables your logistic regression uses.
Upvotes: 5