Skip to content

Instantly share code, notes, and snippets.

@meraldo-aliz
Last active March 2, 2022 17:47
Show Gist options
  • Save meraldo-aliz/f61264e07a60079794c635bf9677749c to your computer and use it in GitHub Desktop.
Save meraldo-aliz/f61264e07a60079794c635bf9677749c to your computer and use it in GitHub Desktop.
lifetimes
from lifetimes.utils import calibration_and_holdout_data
rfm_cal_holdout = calibration_and_holdout_data(transactions=transactions,
customer_id_col='customer_id',
datetime_col='date',
monetary_value_col = 'amount',
freq='W',
calibration_period_end='1998-01-01',
observation_period_end='1998-06-30' )
rfm_cal_holdout.head(3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment