📜  sklearn 逻辑回归得到概率 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:40.759000             🧑  作者: Mango

代码示例1
# 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_