Customer Segmentation in Online Retail | by Rahul Khandelwal | Jan, 2021

0
53

RFM stands for Recency, Frequency, and Monetary. RFM research is a frequently used approach to generate and assign a ranking to every buyer according to how fresh their closing transaction used to be (Recency), what number of transactions they have got made in the closing yr (Frequency), and what the financial price in their transaction used to be (Monetary).

Photo by Austin Distel on Unsplash
Fig: .describe() way on TotalSum column
# Aggregate information on a buyer stage
information = data_rfm.groupby(['CustomerID'],as_index=False).agg({
'InvoiceDate': lambda x: (snapshot_date - x.max()).days,
'InvoiceNo': 'rely',
'TotalSum': 'sum'}).rename(columns = {'InvoiceDate': 'Recency', 'InvoiceNo': 'Frequency','TotalSum': 'MonetaryPrice'})
Fig: RFM ratings and quartiles.
Fig: imply values of recency, frequency, and financial for various RFM ranking values
Fig: imply values of recency, frequency, and financial for various classes

LEAVE A REPLY

Please enter your comment!
Please enter your name here