Skip to content

Instantly share code, notes, and snippets.

@meraldo-aliz
Created March 2, 2022 03:49
Show Gist options
  • Save meraldo-aliz/c40bbe2c36ef4a2a924f31422dc11fed to your computer and use it in GitHub Desktop.
Save meraldo-aliz/c40bbe2c36ef4a2a924f31422dc11fed to your computer and use it in GitHub Desktop.
lifetimes
from lifetimes import BetaGeoFitter
# instantiation of BG-NBD model
bgf = BetaGeoFitter(penalizer_coef=0.0)
# fitting of BG-NBD model
bgf.fit(frequency=rfm_cal_holdout['frequency_cal'],
recency=rfm_cal_holdout['recency_cal'],
T=rfm_cal_holdout['T_cal'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment