Python 预测分析进阶
Nele Verbiest
Senior Data Scientist @PythonPredictions

平均捐赠次数

平均捐赠金额




gifts.groupby("month")["amount"].mean()
gifts.groupby("month").size()

模型时间轴:2018 年 5 月
logreg = linear_model.LogisticRegression() logreg.fit(X_may2018, y_may2018)predictions = logreg.predict_proba(X_jan2019)[:,1] auc = roc_auc_score(y_jan2019, predictions) print(round(auc,2))
0.53
模型时间轴:2018 年 1 月
logreg = linear_model.LogisticRegression() logreg.fit(X_jan2018, y_jan2018)predictions = logreg.predict_proba(X_jan2019)[:,1] auc = roc_auc_score(y_jan2019, predictions) print(round(auc,2))
0.56
Python 预测分析进阶