Customer Segmentation: RFM Anlaysis
Project description
Customer Segmentation: RFM
Customer segmentation and RFM analysis
Recency, frequency, and monetary value (RFM) analysis is a technique used in marketing to determine which customers are the most valuable. RFM is useful for estimating a company's revenue from both existing and potential customers by determining which customers are most likely to make repeat purchases of the company's items.
This package does the data processing for the inputted data, conducts RFM Analysis and provides ability to visualize the results and identify the most valueable customer segments.
Example Usage
I used Online Retail Store data to illustrate functionality of the package.
Here is the data I used for further analysis
The package helps to investigate the data, find anomalies and understand its' overall structure and feauture distributions.
rfm = CustomerSegmentation(df, customer_id='CustomerID', transaction_date='InvoiceDate', amount='Amount')
rfm.exploratory_analysis(df)
With the help of this function we can get descriptive statistics, and important information about the data, with which we are going to work.
The package enables to find the RFM scores, segment the customers based on their scores.
df_scores = rfm.produce_rfm_dateset(df)
df_scores.head()
df_scores = rfm.calculate_rfm_score(df_values)
rfm_table = rfm.find_segments(df_scores)
segment_table = rfm.find_segment_df(rfm.rfm_table)
segment_table.head()
We can also plot the distribution of segments, and visually identify the ones with highest number of customers
rfm.plot_segment_distribution()
rfm.find_customers('Champions')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.