/K-means-clustering-using-RFM-variables

Segmented customers based on Recency,Frequency & Monetary Value (RFM) metrics using K-means clustering algorithm

Primary LanguageJupyter Notebook

K-means-clustering-using-RFM-variables

Objective : Create customer segments by understanding their purchase behaviour for an online retail business.

What is customer segmentation? Customer segmentation is a method of dividing customers into groups or clusters on the basis of common characteristics. why do we need customer segmentation?

  • It will help in identifying the most potential customers.
  • It will help managers to easily communicate with a targetted group of the audience.
  • It will help managers to design special offers for targetted customers, to encourage them to buy more products.
  • It also helps in identifying new products that customers could be interested in.

Types of segmentation

  • Demographic(eg. gender,age,occupation etc.)
  • Geographic(eg. location,region,urban/rural etc.)
  • Behavioral(eg. spending,consumption habits,previously purchased product etc.)
  • psychographic(eg. social status,lifestyle,personality characterstics etc.)

What is RFM Analysis? RFM analysis is a customer segmentation technique that uses past purchase behavior to divide customers into groups,based on

  • RECENCY (R): Time since last purchase
  • FREQUENCY (F): Total number of purchases
  • MONETARY VALUE (M): Total monetary value

K-means clustering algorithm to segment the customers and used Elbow method to find the optimal number of K clusters.

Main Python Libraries used:

  • pandas
  • numpy
  • sklearn
  • Matplotlib,seaborn

About the dataset According to the website for the UCI repository (ref. https://archive.ics.uci.edu/ml/datasets/Online+Retail), this transactional dataset reflects transactions (approx. 1 year's worth) effected between 01/12/2010 and 09/12/2011 for a registered non-store online retail based in the UK.

References