clvkit
Skip to main content
Back to top
Ctrl+K
Search<br>Ctrl+K
System Settings
Light
Dark
GitHub
PyPI
Search<br>Ctrl+K
System Settings
Light
Dark
GitHub
PyPI
clvkit#
Four parameters. Six decimal places. No trace to read.
Buy-till-you-die models for a business where nobody cancels a subscription, so<br>you never observe a customer leaving — you only ever observe them not coming back<br>yet. Six lines take a transaction log to a per-customer CLV table, in 2.0 s<br>of wall clock on the CDNOW sample. Python 3.11+, four dependencies, no compiler.
uv add clvkit # or pip install clvkit
Install
One line, four dependencies, no compiler. Get it into your environment.
Install
User Guide
The key ideas, the four models, and the calls clvkit makes on your behalf.
User Guide
API Reference
Every class and method, documented from the source.
API Reference
Examples
Three worked runs on real data, each answering a question a business asks.
Examples
It lands where the paper said it would#
The BG/NBD model comes from a 2005 paper by Fader, Hardie and Lee in Marketing<br>Science. They fit it on the CDNOW 1/10 systematic sample, 2,357 customers with a<br>39-week calibration period, and printed the four fitted parameters. clvkit fits<br>the same model on the same data and recovers the same four numbers, to the last<br>printed digit.
CDNOW is the yardstick, not the boundary. clvkit fits any transaction log that<br>carries a customer id, a date and an amount, so point it at your own data and the<br>four models run the same way.
What it is
Parameter
Published, 2005
clvkit
Gamma shape for how the purchase rate varies across customers
0.243
0.242595
Gamma scale for that purchase rate
4.414
4.413602
Beta shape for the dropout probability after a purchase
0.793
0.792922
Beta shape for that same dropout probability
2.426
2.425907