Last active
May 27, 2019 20:29
-
-
Save lucdangelis/97cb488bb251a7949dd1db4f1f2e8629 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cal_hold = calibration_and_holdout_data(trans_dataset, | |
'customer_id', | |
'date', | |
calibration_period_end='2018-04-30', #2 years calibration | |
observation_period_end='2019-04-30', #1 year holdout | |
freq = 'M') | |
cal_hold.head() | |
bgf = BetaGeoFitter() | |
bgf.fit(cal_hold['frequency'], cal_hold['recency'], cal_hold['T']) | |
plot_calibration_purchases_vs_holdout_purchases(bgf, cal_hold) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment