All Projects → jdmaturen → shifted_beta_geometric_py

jdmaturen / shifted_beta_geometric_py

Licence: Apache-2.0 license
An implementation of the shifted-beta-geometric (sBG) model from Fader and Hardie's "How to Project Customer Retention" (2006)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to shifted beta geometric py

Ml Feynman Experience
A collection of analytics methods implemented with Python on Google Colab
Stars: ✭ 217 (+342.86%)
Mutual labels:  scipy
CNCC-2019
Computational Neuroscience Crash Course (CNCC 2019)
Stars: ✭ 26 (-46.94%)
Mutual labels:  scipy
psopy
A SciPy compatible super fast Python implementation for Particle Swarm Optimization.
Stars: ✭ 33 (-32.65%)
Mutual labels:  scipy
Orange3
🍊 📊 💡 Orange: Interactive data analysis
Stars: ✭ 3,152 (+6332.65%)
Mutual labels:  scipy
PyCannyEdge
Educational Python implementation of the Canny Edge Detector
Stars: ✭ 31 (-36.73%)
Mutual labels:  scipy
sdaopt
Simulated Dual Annealing for python and benchmarks
Stars: ✭ 15 (-69.39%)
Mutual labels:  scipy
Sparse dot topn
Python package to accelerate the sparse matrix multiplication and top-n similarity selection
Stars: ✭ 202 (+312.24%)
Mutual labels:  scipy
PageRank
A demonstration of the PageRank algorithm, using Eigenvectors to assign significance to HTML pages
Stars: ✭ 17 (-65.31%)
Mutual labels:  scipy
xkcd-2048
No description or website provided.
Stars: ✭ 12 (-75.51%)
Mutual labels:  scipy
object-detection-with-svm-and-opencv
detect objects using svm and opencv
Stars: ✭ 24 (-51.02%)
Mutual labels:  scipy
LiveFader
@IBDesignable Horizontal or vertical UIControl subclass that can start from bottom or middle of the control.
Stars: ✭ 21 (-57.14%)
Mutual labels:  fader
skan
Python module to analyse skeleton (thin object) images
Stars: ✭ 92 (+87.76%)
Mutual labels:  scipy
scipy-crash-course
Material for a 24 hours course on Scientific Python
Stars: ✭ 98 (+100%)
Mutual labels:  scipy
The Elements Of Statistical Learning Notebooks
Jupyter notebooks for summarizing and reproducing the textbook "The Elements of Statistical Learning" 2/E by Hastie, Tibshirani, and Friedman
Stars: ✭ 241 (+391.84%)
Mutual labels:  scipy
Fourier-and-Images
Fourier and Images
Stars: ✭ 81 (+65.31%)
Mutual labels:  scipy
Cheatsheets Ai
Essential Cheat Sheets for deep learning and machine learning researchers https://medium.com/@kailashahirwar/essential-cheat-sheets-for-machine-learning-and-deep-learning-researchers-efb6a8ebd2e5
Stars: ✭ 14,095 (+28665.31%)
Mutual labels:  scipy
jupyter boilerplate
Adds a customizable menu item to Jupyter (IPython) notebooks to insert boilerplate snippets of code
Stars: ✭ 69 (+40.82%)
Mutual labels:  scipy
meta-scipy
OpenEmbedded layer for scipy (ARCHIVED)
Stars: ✭ 20 (-59.18%)
Mutual labels:  scipy
econtools
Econometrics and data manipulation functions.
Stars: ✭ 96 (+95.92%)
Mutual labels:  scipy
techloop-ml-plus
Archives and Tasks for ML+ sessions
Stars: ✭ 23 (-53.06%)
Mutual labels:  scipy

sBG model of customer retention

A python implementation of the shifted-beta-geometric (sBG) model from Fader and Hardie's "How to Project Customer Retention" (2006).

Important note to modelers: amongst other presumptions, see §3 of the paper, sBG is only applicable to discrete, contractual customer relationships:

Custer Bases Diagram

Figure Source: "Probability Models for Customer-Base Analysis" (Fader and Hardie 2009)

Example

from shifted_beta_geometric import derl, fit, predicted_survival

# measured percentage of cohort that survives over time
example_data = [.869, .743, .653, .593, .551, .517, .491]

# fit our observed data to the sBG model, which returns the parameters alpha and beta
alpha, beta = fit(example_data)

# predict the next 5 time samples:
future = predicted_survival(alpha, beta, len(example_data) + 5)[-5:]

# future = [0.460, 0.436, 0.414, 0.395, 0.378]

# compute the discounted expected residual lifetime (DERL) for the survivors
# of this cohort at point in time t:
discount = 0.10  # rate at which we discount future revenue
                 # to get value in today's terms, e.g. 10%/year
t = len(example_data)
residual_cohort_lifetime = derl(alpha, beta, discount, t)

# residual_cohort_lifetime = 7.530

# if our average revenue per period per customer is a constant v_avg,
# to get the residual customer lifetime value (CLV) of this cohort
# we simply multiply the residual_cohort_lifetime by v_avg:

v_avg = 10
residual_cohort_clv = residual_cohort_lifetime * v_avg

# thus residual_cohort_clv = $75.30 per customer in this cohort

Requirements

sBG requires numpy and scipy for fitting and the gauss hypergeometric function.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].