gamma delta t cells code example
Example: gamma gamma fitter
bgf.fit(summary_with_money_value['frequency'], summary_with_money_value['recency'], summary_with_money_value['T'])
print(ggf.customer_lifetime_value(
bgf,
summary_with_money_value['frequency'],
summary_with_money_value['recency'],
summary_with_money_value['T'],
summary_with_money_value['monetary_value'],
time=12,
discount_rate=0.01
).head(10))
"""
customer_id
1 140.096211
2 18.943467
3 38.180574
4 38.180574
5 38.180574
6 1003.868107
7 28.109683
8 38.180574
9 167.418216
10 38.180574
Name: clv, dtype: float64
"""