Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Measure customer lifetime value in Python

Project Description

Measuring users is hard. Lifetimes makes it easy.

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).

Documenation 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).
Release History

Release History

This version
History Node

0.8.1.0

History Node

0.8.0.0

History Node

0.7.1.0

History Node

0.7.0.0

History Node

0.6.0.0

History Node

0.5.0.0

History Node

0.4.0.0

History Node

0.3.0.0

History Node

0.2.2.2

History Node

0.2.2.1

History Node

0.2.2.0

History Node

0.2.1.0

History Node

0.2.0.0

History Node

0.1.6.4

History Node

0.1.6.3

History Node

0.1.6.2

History Node

0.1.6.1

History Node

0.1.6.0

History Node

0.1.5.1

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Lifetimes-0.8.1.0-py2.py3-none-any.whl (603.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Aug 28, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting