Git Product home page Git Product logo

customer-lifetime-value-contractual-or-non-contractual-relationship's Introduction

Customer lifetime value analysis for a contract and non-contract based business

Unfortunately, many businesses calculate CLV using historical customer behavior without accounting for variation in that behavior. For example, a customer who buys several expensive items at once might be assigned a higher value than a customer who consistently buys moderately priced items โ€” even if he or she never buys from the business again after the initial purchase.

There are two classes of business contexts that influence how a data scientist should go about modeling customer lifetime value:

  1. Whether purchases are discrete or continuous.

  2. Whether the setting is contractual or non-contractual.

Discrete purchases occur at fixed periods or frequencies, whereas continuous purchases occur at any time. Whether purchases are contractual or not determines whether customer churn is visible or must be inferred; This example is for non-contractual, but you can hook up AutoML for Customer Churn project, here, for a contractual business.

CLV models can provide lots of actionable information, like the probability that a customer will churn or a population-level prediction of how many orders customers will be placing at a given time. These insights are critical for data-driven retention measures and sales forecasts, respectively.

Additional reading:

How to set up the project

TODO: Turn this into a Docker container

Pandas:           $ sudo pip install pandas
numpy:            $ sudo pip install numpy
scipy:            $ sudo pip install scipy
matplotlib: 
                  $ sudo apt-get install libfreetype6-dev libpng-dev
                  $ sudo pip install matplotlib 
seaborn:          $ sudo pip install seaborn
jupyter notebook: $ sudo apt-get -y install ipython ipython-notebook
                  $ sudo -H pip install jupyter
lifetimes:        $ sudo pip install lifetimes

Dataset

  • Data set can be download from this link
  • There is no need to download dataset because it is already downloaded.
  • Path of dataset is ./input_data/

Usage

Run the code given in ipython notebook customer_lifetime_value.ipynb

Credit

Boilerplate code credits for this code go to Susan Li, I just made it more accessible to a contractual lifetime value analysis which can be coupled with my AutoML for Customer Churn project.

customer-lifetime-value-contractual-or-non-contractual-relationship's People

Contributors

daddydrac avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.