Introduction à l'analytique prédictive en Python
Nele Verbiest, Ph.D
Data Scientist @PythonPredictions
0,545 * gender_F
+ 0,021 * age
-0,001 * time_since_last_gift
-3,39
0,545 * 1
+ 0,021 * 72
-0,001 * 120
-3,39
= -1,45
$\frac{1}{1+e^{-(-1.45)}} = 0.19$
logreg.predict_proba([1, 72, 120])
array([[ 0.8204144, 0.1795856]])
new_data = current_data[["gender_F","age","time_since_last_gift"]]
predictions = logreg.predict_proba(new_data)
Introduction à l'analytique prédictive en Python