Finding coefficients for logistic regression in python
问题 I'm working on a classification problem and need the coefficients of the logistic regression equation. I can find the coefficients in R but I need to submit the project in python. I couldn't find the code for learning coefficients of logistic regression in python. How to get the coefficient values in python? 回答1: sklearn.linear_model.LogisticRegression is for you. See this example: from sklearn.linear_model import LogisticRegression from sklearn.datasets import load_iris X, y = load_iris