Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sklearn logistic regression get probability

# 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_
Source by scikit-learn.org #
 
PREVIOUS NEXT
Tagged: #sklearn #logistic #regression #probability
ADD COMMENT
Topic
Name
2+9 =