sklearn logistic regression get probability

46

# Getting probabilities as the output from logit regression, sklearn
from sklearn.linear_model import LogisticRegression

reg = LogisticRegression()
reg.predict_proba(predictor_array)
# Returns the probability of the sample for each class in the model,
# where classes are ordered as they are in self.classes_

Comments

Submit
0 Comments