当前位置:网站首页>Summary of customer value model (RFM) technology for data analysis
Summary of customer value model (RFM) technology for data analysis
2022-07-07 07:21:00 【Data analysis cases】
author | leo
An important concept in management is customer relationship management (CRM), Its core purpose is to improve the core competitiveness of enterprises , By improving the interaction between enterprises and customers , Optimize customer management , So as to attract new customers 、 The operation mechanism of retaining old customers and transforming existing customers into loyal customers .
One of the most classic implementation models is RFM Model , It mainly depends on the recent consumption time of each customer , Purchase frequency and purchase amount are used to divide the value status of different customers .
So that we can carry out personalized operation and marketing for different users .
01 RFM Core dimensions of the model
In view of the above 3 Dimensions , Our expectations :
Time of last consumption (Recency):
This dimension refers to the last consumption interval (R), That is, the time interval of the last consumption , The smaller the value, the higher the customer value , This is because the closer the consumption interval is, the more likely customers are to have secondary consumption .
Consumption frequency and times in a certain period (Frequency):
Consumption frequency (F) It reflects the purchase frequency of customers , Then the higher the purchase frequency , The more it can reflect the consumption activity of users , therefore , The higher the customer value .
The total amount consumed in a certain period (Monetary):
Consumption amount (M) This can be seen from the literal meaning , The higher the user's consumption amount , The stronger the consumption ability of users , Then the higher the value of natural users .
02 RFM Divide user types and corresponding operation strategies
03 Excel To realize RFM Model
In order to solve the defects of existing methods , The author proposed for the first time that MCL、SSL and Excel It's the realization of RFM Model is an important and very direct tool , Just use it flexibly Excel The built-in function can realize the summary calculation of data , obtain RFM The three index values of the model , So as to extract the value types of users , Let's carry out targeted business promotion strategies .
Next, let's show you one that uses Excel Realized RFM Model :
【 Data sources 】
Monthly sales data of a Taobao store
【 Analysis objectives 】
According to the existing order data , Build store user value model , So as to lay the foundation for the subsequent refined operation of different customer groups
【 Data preprocessing 】
The amount of data is about 3989 strip , Can be in excel Internal treatment , You can also use python Deal with large quantities of data .
3.1 Extract keyword fields :
【 Buyer member name 】、【 Total sum 】、【 Order payment time 】、 And set the corresponding data type , We will do it on the same page RFM The calculation of the value .
3.2 Calculation Recency, Monetary,Frequency
Recency: Through to 【 Buyer member name 】、【 Total sum 】、【 Order payment time 】 Make a pivot table with three columns of data , Maximize the order payment time , That is, the latest consumption time , Then calculate the difference with the observation time , Available R value
Monetary: Calculate the average value of customers' different consumption under the total amount , You can get the M value
Frequency: Count the order payment time , Is the consumption frequency of the customer F value
3.3 Customer RFM model
Calculate the customer's R、F、M After value , Then we can realize the customer RFM Evaluation of the model .
【 Simple implementation 】
At this time, it can be calculated first R、F、M The average of the three values , Then compare each dimension of the customer with the average value of that dimension , If it exceeds the average value, it is high , Otherwise, it is low .
Then pass the three columns of fields ’&’ Connectors are linked , Generate RFM Auxiliary column .
Then we use the value model reference table prepared in advance , Generate user value model .
Finally through excel Of vlookup Function to extract the customer type field into the calculation table , We have achieved our final result .
【 Scoring method 】
Through the user's R、F、M The difference between the value and the corresponding value ( The difference between the maximum and the minimum ), To make sure R-Score, F-Score,M-Score.
So first calculate R、F、M The maximum of 、 minimum value 、 Range trisection
Maximum : adopt “=max(B5:B1204)” Calculation ,( Calculation F when B Switch to C,M when B Switch to D that will do )
minimum value : adopt “=min(B5:B1204)” Calculation ( Calculation F when B Switch to C,M when B Switch to D that will do )
range : adopt “=(F1-F2)/3” Calculation ( Calculation F when F Switch to G,M when F Switch to H that will do )
R-Score Calculation method : stay E5 Cell input :
“=IF(ROUNDUP((B5-$F$2)/$F$3,0)=0,1,ROUNDUP((B5-$F$2)/$F$3,0)) ”
F-score and M-score The calculation method is similar :
“=IF(ROUNDUP((C5-$G$2)/$G$3,0)=0,1,ROUNDUP((C5-$G$2)/$G$3,0))”
“ =IF(ROUNDUP((D5-$H$2)/$H$3,0)=0,1,ROUNDUP((D5-$H$2)/$H$3,0))”
RFM-Score The calculation adopts R、F、M In percentile 、 Ten 、 It is realized by forming three digits with three bits , share 3*3*3=27 Combination mode .
H5 Cell formula :“=E5*100+F5*10+G5”
The drop-down fill handle applies to the entire list , Get the final result :
Then the data table area A4 To H3996 Perform pivoting : Summarize different RFM-Score Corresponding customer groups .
The distribution of customers can be visually displayed in the form of data bars .
04 Python Realization RFM Model
adopt Python While processing data , First of all, we need to pay attention to whether the extracted data needs preprocessing , For example, whether the type of data meets expectations , Whether the field name needs to be adjusted , Whether the missing value needs to be filled , Whether duplicate values need to be removed, and so on , So the first step is to get familiar with the data :
4.1 Familiar with data sources
There are many methods commonly used for preliminary understanding of data, such as :shape( Understand the size of the data , A few lines and columns ),head( Display the first few pieces of data ),tail( Display the last few pieces of data of the data source ),sample( Randomly extract several pieces of data ),info( Display the data type of each field of the data source ),describe( Mathematical description of the data source ).
The results are as follows :
Through the above figure, we find that there will be some invalid orders in the transaction records , Then we must first rule out such orders , Then you can pass pandas Boolean index to filter data :
give the result as follows :
4.2 Select field
Since we only need the buyer's payment time , Date of purchase , The three fields of paid in amount , We just need to process their data , Therefore, other fields can be excluded .
give the result as follows :
Missing value processing :
4.3 RFM modeling :
A. Calculation R value
Add days field , Calculate the payment time and observation date to get R value
The operation results are as follows :
B. Calculation R、F、M value
Through aggregate functions , Count the nickname of the buyer to obtain the consumption frequency F value , Calculate the minimum value of the days field to get the customer's R value , The sum of the paid in amount is used to obtain the customer's M value .
The operation results are as follows :
C. User value rating
By the above calculation , We can treat customers according to different scores R、F、M Score according to the value , In this case :
R value : The minimum value we get is 660, With 30 Days as an interval ,660-690 God , hit 5 branch ;690-720, hit 4 branch ;720-750 hit 3 branch ;750-780 hit 2 branch ;>780, hit 1 branch .
F value : The minimum value we get is 1 Time , With 1 Times as a time interval ,0-2, hit 1 branch ;2-3, hit 2 branch ;3-4, hit 3 branch ;4-5, hit 4 branch ;>5, hit 5 branch .
M finger : The minimum value we get is 0.005 element , We use 500 Yuan as time interval ,0-50, hit 1 branch ;50-100, hit 2 branch ;100-150, hit 3 branch ;150-200, hit 4 branch ;>200, hit 5 branch .
Establish procedures and methods according to the above standards :
Running results :
D. User tag settings :
First step : Computing users R、F、M Average :
Running results
The second step : Verify whether the user's indicators exceed the average , If yes, one point is counted , Otherwise, there will be no points .
The operation results are as follows :
The third step : Generate user label columns :
The operation results are as follows :
E. Visual presentation :
Histogram :
The operation results are as follows :
Through the analysis of the above data analysis tools , We can find that in the implementation RFM Model method ,Python It has more powerful usability and flexibility , And have complete data analysis means , From data preprocessing 、 Analysis to the final data presentation .
and Excel Application scenarios are also very common in practical work , Through this case, we can practice well Excel Correlation function , I hope this article is helpful to your data analysis journey .
边栏推荐
猜你喜欢
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
我理想的软件测试人员发展状态
身边35岁程序员如何建立起技术护城河?
main函数在import语句中的特殊行为
Academic report series (VI) - autonomous driving on the journey to full autonomy
freeswitch拨打分机号源代码跟踪
Non empty verification of collection in SQL
$parent (get parent component) and $root (get root component)
面试官:你都了解哪些开发模型?
1089: highest order of factorial
随机推荐
抽絲剝繭C語言(高階)指針的進階
How can flinksql calculate the difference between a field before and after update when docking with CDC?
Multithreading and high concurrency (9) -- other synchronization components of AQS (semaphore, reentrantreadwritelock, exchanger)
非父子组件的通信
抽丝剥茧C语言(高阶)指针的进阶
Abnova membrane protein lipoprotein technology and category display
Use of completable future
关于二进制无法精确表示小数
Big coffee gathering | nextarch foundation cloud development meetup is coming
组件的通信
栈题目:有效括号的嵌套深度
【云原生】内存数据库如何发挥内存优势
freeswitch拨打分机号源代码跟踪
Readonly read only
云备份项目
Advanced level of C language (high level) pointer
How can clothing stores make profits?
ViewModelProvider. Of obsolete solution
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
FullGC问题分析及解决办法总结