Skip to main content

Measure customer lifetime value in Python

Project description

Measuring users is hard. Lifetimes makes it easy.

PyPI version Documentation Status Build Status Coverage Status

Introduction

Lifetimes can be used to analyze your users based on a few assumption:

  1. Users interact with you when they are “alive”.

  2. Users under study may “die” after some period of time.

I’ve quoted “alive” and “die” as these are the most abstract terms: feel free to use your own definition of “alive” and “die” (they are used similarly to “birth” and “death” in survival analysis). Whenever we have individuals repeating occurrences, we can use Lifetimes to help understand user behaviour.

Applications

If this is too abstract, consider these applications:

  • Predicting how often a visitor will return to your website. (Alive = visiting. Die = decided the website wasn’t for them)

  • Understanding how frequently a patient may return to a hospital. (Alive = visiting. Die = maybe the patient moved to a new city, or became deceased.)

  • Predicting individuals who have churned from an app using only their usage history. (Alive = logins. Die = removed the app)

  • Predicting repeat purchases from a customer. (Alive = actively purchasing. Die = became disinterested with your product)

  • Predicting the lifetime values of your customers

Specific Application: Customer Lifetime Value

As emphasized by P. Fader and B. Hardie, understanding and acting on customer lifetime value (CLV) is the most important part of your business’s sales efforts. And (apparently) everyone is doing it wrong. Lifetimes is a Python library to calculate CLV for you.

Installation

pip install lifetimes

Requirements are only Numpy, Scipy, Pandas, Dill (and optionally-but-seriously matplotlib).

Documentation and tutorials

Official documentation

Questions? Comments? Requests?

Please create an issue in the lifetimes repository.

More Information

  1. Roberto Medri did a nice presentation on CLV at Etsy.

  2. Papers, lots of papers.

  3. R implementation is called BTYD (for, Buy ‘Til You Die).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Lifetimes-0.9.1.0.tar.gz (572.9 kB view details)

Uploaded Source

Built Distributions

Lifetimes-0.9.1.0-py3-none-any.whl (606.2 kB view details)

Uploaded Python 3

Lifetimes-0.9.1.0-py2.py3-none-any.whl (606.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Lifetimes-0.9.1.0.tar.gz.

File metadata

  • Download URL: Lifetimes-0.9.1.0.tar.gz
  • Upload date:
  • Size: 572.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Lifetimes-0.9.1.0.tar.gz
Algorithm Hash digest
SHA256 43104480e9c3f29bc61606d8156e7f37045f1c728849e8a633bdbd988e3a408d
MD5 04f694ede714a1bdb055053fd41a2bc2
BLAKE2b-256 d70500bbe0c7155dda23a064a725c20914ccfaff16ee94885d44118aca7c8b2b

See more details on using hashes here.

File details

Details for the file Lifetimes-0.9.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Lifetimes-0.9.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 475c649662febc59452296a5fd1233cb6625285224ac436366590a9efdb9cbe0
MD5 c2b93c8f58fdbce92f1556020a975199
BLAKE2b-256 99ade9f7c650cf9dc476ffdf177d19e6aaaad6d48e3c4ea0205810e07b96d376

See more details on using hashes here.

File details

Details for the file Lifetimes-0.9.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Lifetimes-0.9.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f22841790e63fdd13d8d4056cd94ce55953d2617a9335520e05bf3e3fb8f38af
MD5 dfa9a751af1b6ee45f9793ee6b060c58
BLAKE2b-256 a0d78941ed9a553320c5ccc120ad2e8b9be9d7951982d26d8bc038ffd696618d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page