Skip to main content

Measure customer lifetime value in Python

Project description

image0

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 value 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.10.1.tar.gz (558.0 kB view details)

Uploaded Source

Built Distributions

Lifetimes-0.10.1-py3-none-any.whl (581.6 kB view details)

Uploaded Python 3

Lifetimes-0.10.1-py2-none-any.whl (581.6 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: Lifetimes-0.10.1.tar.gz
  • Upload date:
  • Size: 558.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for Lifetimes-0.10.1.tar.gz
Algorithm Hash digest
SHA256 6d2b0f0e04c94b90aae2d2e13e47f19d9d7aeb5b59d7f9dd0f269394cdfcf3ea
MD5 185a8dd27b14b956f61a6f0e439139d6
BLAKE2b-256 44aeaffb54d69e81c2526c32873d2f180a30a74b7b0b3205b21430d33f26f94b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Lifetimes-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 581.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for Lifetimes-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b78279b1d5cbcc94441f61c643f5246db5bb9baccd29257cfc67a057db8c880
MD5 fd36ca27ef217d8f1bc22b8f20414975
BLAKE2b-256 32a70769293ffd5757bdbb626167b4361e46d353b028b4045a82aa2bae20e17e

See more details on using hashes here.

File details

Details for the file Lifetimes-0.10.1-py2-none-any.whl.

File metadata

  • Download URL: Lifetimes-0.10.1-py2-none-any.whl
  • Upload date:
  • Size: 581.6 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for Lifetimes-0.10.1-py2-none-any.whl
Algorithm Hash digest
SHA256 5ba38322519421046b2aae9af87dfcbaf39b2052798309c9dc5f88e6b57e9df8
MD5 adee89839129ac1b8f43d99d9323c5ea
BLAKE2b-256 54a14a53f6e00ac46c364ce70e7fa8f7c4141b951642375a61c4a90f12b497dd

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