Seasonality

Gevorderde voorspellende analyse in Python

Nele Verbiest

Senior Data Scientist @PythonPredictions

Seasonal effects (1)

Gevorderde voorspellende analyse in Python

Seasonal effects (2)

Mean number of donations

Gevorderde voorspellende analyse in Python

Seasonal effects (3)

Mean donation amount

Gevorderde voorspellende analyse in Python

Seasonality and the timeline (1)

Gevorderde voorspellende analyse in Python

Seasonality and the timeline (2)

Gevorderde voorspellende analyse in Python

Seasonality and the timeline (3)

Gevorderde voorspellende analyse in Python

Dealing with seasonality

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

Gevorderde voorspellende analyse in 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
Gevorderde voorspellende analyse in Python

Let's practice!

Gevorderde voorspellende analyse in Python

Preparing Video For Download...