Institute of Computer Science
  1. Courses
  2. 2017/18 spring
  3. Business Data Analytics (MTAT.03.319)
ET
Log in

Business Data Analytics 2017/18 spring

  • Main
  • Lectures
  • Practice sessions
  • Class Assignments
  • Homework
  • Discussion board
  • Links

Customer Segmentation using RFM Analysis

Dataset: “online retail” under http://archive.ics.uci.edu/ml/datasets.html

RFM stands for the three dimensions:

  • Recency – How recently did the customer purchase?
  • Frequency – How often do they purchase?
  • Monetary Value – How much do they spend?

The resulting segments can be ordered from most valuable (highest recency, frequency, and value) to least valuable (lowest recency, frequency, and value). Identifying the most valuable RFM segments can capitalize on chance relationships in the data used for this analysis.

Step 1: Data Cleaning (2 pt)

Delete all negative Quantity and Price. We also need to delete NA customer ID

Step 2: Recode variables (2 pt)

We should do some recoding and convert character variables to factors.

Step 3:Calculate RFM (3 pt)

To implement the RFM analysis, we need to further process the data set in by the following steps:

Step 3.1: Find the most recent date for each ID and calculate the days to the now or some other date, to get the Recency data

Step 3.2: Calculate the quantity of translations of a customer, to get the Frequency data

Step 3.3: Sum the amount of money a customer spent and divide it by Frequency, to get the amount per transaction on average, that is the Monetary data.

Step 4: Plot the Histograms and if skewed, use log scale to normalize (3 pt)

  • Institute of Computer Science
  • Faculty of Science and Technology
  • University of Tartu
In case of technical problems or questions write to:

Contact the course organizers with the organizational and course content questions.
The proprietary copyrights of educational materials belong to the University of Tartu. The use of educational materials is permitted for the purposes and under the conditions provided for in the copyright law for the free use of a work. When using educational materials, the user is obligated to give credit to the author of the educational materials.
The use of educational materials for other purposes is allowed only with the prior written consent of the University of Tartu.
Terms of use for the Courses environment