https://github.com/camdavidsonpilon/lifetimes

Lifetime value in Python

https://github.com/camdavidsonpilon/lifetimes

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 43 committers (4.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

data-science python statistics

Keywords from Contributors

bayesian-inference statistical-analysis regression-models
Last synced: 6 months ago · JSON representation

Repository

Lifetime value in Python

Basic Info
  • Host: GitHub
  • Owner: CamDavidsonPilon
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 4.05 MB
Statistics
  • Stars: 1,464
  • Watchers: 52
  • Forks: 378
  • Open Issues: 1
  • Releases: 7
Archived
Topics
data-science python statistics
Created about 11 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

Read me first: Latest on the lifetimes project

👋 This codebase has moved to "archived-mode". We won't be adding new features, improvements, or even answering issues in this codebase.

A project has emerged as a successor to lifetimes, PyMC-Lab/PyMC-Marketing, please check it out!

Measuring users is hard. Lifetimes makes it easy.

Inactively Maintained 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 (Prof. Fader's Video Lecture). Lifetimes is a Python library to calculate CLV for you.

Installation

bash pip install lifetimes

Contributing

Please refer to the Contributing Guide before creating any Pull Requests. It will make life easier for everyone.

Documentation and tutorials

Official documentation

Questions? Comments? Requests?

Please create an issue in the lifetimes repository.

Main Articles

  1. Probably, the seminal article of Non-Contractual CLV is Counting Your Customers: Who Are They and What Will They Do Next?, by David C. Schmittlein, Donald G. Morrison and Richard Colombo. Despite it being paid, it is worth the read. The relevant information will eventually end up in this library's documentation though.
  2. The other (more recent) paper is “Counting Your Customers” the Easy Way: An Alternative to the Pareto/NBD Model, by Peter Fader, Bruce Hardie and Ka Lok Lee.

More Information

  1. Roberto Medri did a nice presentation on CLV at Etsy.
  2. Papers, lots of papers.
  3. R implementation is called BTYD (Buy 'Til You Die).
  4. Bruce Hardie's Website, especially his notes, is full of useful and essential explanations, many of which are featured in this library.

Owner

  • Name: Cameron Davidson-Pilon
  • Login: CamDavidsonPilon
  • Kind: user
  • Location: Waterloo, Canada
  • Company: @Pioreactor

CEO of Pioreactor. Former Director of Data Science @Shopify. Author of Bayesian Methods for Hackers and DataOrigami.

GitHub Events

Total
  • Watch event: 26
  • Fork event: 9
Last Year
  • Watch event: 26
  • Fork event: 9

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 451
  • Total Committers: 43
  • Avg Commits per committer: 10.488
  • Development Distribution Score (DDS): 0.415
Past Year
  • Commits: 2
  • Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Cameron Davidson-Pilon c****n@g****m 264
Anton Protopopov a****v@g****m 50
Richard Hydomako r****o@g****m 27
luke14free l****l@p****m 22
Philippe Fanaro p****o@g****m 14
Erik Vandeputte e****k@n****m 8
Yanir Seroussi y****i@g****m 7
statwonk c****9@g****m 6
Anton Protopopov a****v@g****m 4
github kyleyang k****6@c****u 3
vruvora v****8@g****u 3
Arnold Lin c****t@a****h 3
Michael Schreier m****r@g****e 3
Dani Garrido d****o@g****m 2
Henry Hammond h****2@g****m 2
Tim Finkel t****m@T****l 2
Ilan Man i****n@g****m 2
Ben Van Dyke b****n@d****m 2
Utkarsh Gupta u****7@g****m 2
Robert Enzmann r****n@a****m 2
Adrien Marteau a****u@f****m 1
Arnold Lin a****n@p****m 1
Cameron Davidson-Pilon c****p@C****l 1
Low, Zhi Hao l****o@g****m 1
Jacky Ma a****e@A****l 1
Harry Brundage h****e@g****m 1
Chris Fournier c****r@g****m 1
Eric Chiang e****m@g****m 1
Rodney Keeling r****g@g****m 1
Keshav Ramaswamy k****y@i****m 1
and 13 more...

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 169
  • Total pull requests: 19
  • Average time to close issues: over 4 years
  • Average time to close pull requests: 21 days
  • Total issue authors: 124
  • Total pull request authors: 17
  • Average comments per issue: 2.86
  • Average comments per pull request: 2.21
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 5
  • Pull requests: 0
  • Average time to close issues: about 24 hours
  • Average time to close pull requests: N/A
  • Issue authors: 5
  • Pull request authors: 0
  • Average comments per issue: 1.8
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • SSMK-wq (5)
  • CamDavidsonPilon (5)
  • shaddyab (4)
  • GrowthJeff (4)
  • NudnikShpilkis (3)
  • martingg92 (3)
  • dmanhattan (3)
  • jonimatix (3)
  • psygo (3)
  • hmikelee (3)
  • Kara035 (3)
  • MingCong18 (2)
  • vruvora (2)
  • clausherther (2)
  • ahmadreza-smdi (2)
Pull Request Authors
  • psygo (3)
  • thomasburgess (2)
  • CamDavidsonPilon (2)
  • harrisong (2)
  • orenshk (2)
  • rahulshivan05 (2)
  • meremeev (2)
  • Arnoldosmium (2)
  • sam-lupton (1)
  • alonnir (1)
  • utkarshgupta137 (1)
  • ea-niibo (1)
  • iRajMishra (1)
  • lowzhao (1)
  • Nicky027 (1)
Top Labels
Issue Labels
theory (31) use case (23) new feature suggestion (15) docs (13) code improvement (13) tutorial (10) bug (8) version issues (7) incomplete description (7) help wanted (2) duplicate (1) installation issues (1)
Pull Request Labels
code improvement (5) new feature suggestion (4) spam (2) bug (2) docs (1)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 318,854 last-month
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 28
    (may contain duplicates)
  • Total versions: 46
  • Total maintainers: 1
pypi.org: lifetimes

Measure customer lifetime value in Python

  • Versions: 30
  • Dependent Packages: 2
  • Dependent Repositories: 28
  • Downloads: 318,854 Last month
Rankings
Downloads: 0.6%
Stargazers count: 1.8%
Average: 2.0%
Dependent packages count: 2.1%
Forks count: 2.7%
Dependent repos count: 2.8%
Maintainers (1)
Last synced: 6 months ago
proxy.golang.org: github.com/CamDavidsonPilon/lifetimes
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 7 months ago
proxy.golang.org: github.com/camdavidsonpilon/lifetimes
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 7 months ago
conda-forge.org: lifetimes
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 8.1%
Stargazers count: 10.0%
Average: 25.8%
Dependent repos count: 34.0%
Dependent packages count: 51.2%
Last synced: 6 months ago

Dependencies

.github/workflows/pythonpublish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
dev_requirements.txt pypi
  • autopep8 * development
  • coveralls * development
  • flake8 * development
  • matplotlib * development
  • pycodestyle * development
  • pydocstyle * development
  • pytest * development
  • pytest-cov ==2.5.1 development
  • pytest-mpl * development
docs/docs_requirements.txt pypi
  • recommonmark *
  • sphinxcontrib-napoleon *
requirements.txt pypi
  • dill >=0.2.6
  • numpy >1.10.0
  • pandas >=0.24.0
  • scipy >=1.0.0
setup.py pypi
  • numpy >=1.10.0