Seasonality

Phân tích dự đoán nâng cao với Python

Nele Verbiest

Senior Data Scientist @PythonPredictions

Seasonal effects (1)

Phân tích dự đoán nâng cao với Python

Seasonal effects (2)

Mean number of donations

Phân tích dự đoán nâng cao với Python

Seasonal effects (3)

Mean donation amount

Phân tích dự đoán nâng cao với Python

Seasonality and the timeline (1)

Phân tích dự đoán nâng cao với Python

Seasonality and the timeline (2)

Phân tích dự đoán nâng cao với Python

Seasonality and the timeline (3)

Phân tích dự đoán nâng cao với Python

Dealing with seasonality

  • Check for seasonality
gifts.groupby("month")["amount"].mean()
gifts.groupby("month").size()
  • Use appropriate timeline in history

Phân tích dự đoán nâng cao với Python

Seasonality and predictive models

Model timeline May 2018

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

Model timeline January 2018

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
Phân tích dự đoán nâng cao với Python

Let's practice!

Phân tích dự đoán nâng cao với Python

Preparing Video For Download...