Code Monkey home page Code Monkey logo

clv's Introduction

Calculating Customer Lifetime Value (CLV) with Recency, Frequency, and Monetary (RFM)

CLV, "the present value of future cash flow attributed to a customer's tenure with a company", can be determined by variety of approaches. Based on a simple equation, one can calculate the cumulative profit (value) from a customer based on assumptions such as retention rate and historical profit margin from customers. However, a customer's retention can be influenced by factors such as demographics (age, geography, education background), behavior (Recency, Purchase Frequency, Monetary Contribution), competitions, peer influences, etc.. As a result, a dynamic approach should be taken to account for such variations.

In this repo, I calculated CLV by predicting the retention rate (r) of customers' future purchasing cycle using Logistic Regression based on his/her Recency of purchase, purchase Frequency, and Monetary contribution from past purchases.


RFM

By definition, RFM represents:

  • R(ecency): how recently did customer purchase?
  • F(rquency): how often do customer purchase?
  • M(onetary Value): how much do they spend (each time on average)?

The determination of Recency, Frequency, and Monetary of a customer, should provide insights to the following:

  1. How to segment customers to determine who are more likely to response to ads / to purchase?
  2. Which type of customers to send ads in order to breakeven and make profit?

Data

The CDNow data set (download at here), consists of 69,659 transaction records by 23,570 unique customers, captures the purchase records between Jan 1997 and June 1998.


Code

  • Source code (R)

References

This project was largely based on the work done by Jack Han at Data Apple. However, new libraries/functions are used to update data transformation and visualization of data such as dplyr and ggviz.

Other references used:

created by stackedit.io

clv's People

Contributors

rtheman avatar

Watchers

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