Customer Churn Prediction Method Based on Mixed Sampling

By combining undersampling and oversampling techniques in customer churn prediction, new minority class samples are generated and support vector machine learning is performed, which solves the impact of unbalanced data sets on the prediction effect in traditional methods and improves prediction accuracy and efficiency.

CN114118614BInactive Publication Date: 2024-10-18SHANGHAI HEYIN NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111478009.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When traditional classification learning algorithms deal with imbalanced data sets, especially in customer churn prediction, it is difficult to effectively identify minority class samples, resulting in poor prediction results. Existing resampling methods such as undersampling and oversampling suffer from sample loss or overfitting. problem of integration.

Method used

Adopt a method based on hybrid sampling, combined with under-sampling and over-sampling technology, process majority class samples through DBSCAN or K-Means under-sampling, and use the QCSOMTE algorithm to generate new minority class samples to ensure that the samples are distributed inside the quadrilateral to avoid noise and improve efficiency , which is ultimately used in support vector machines for supervised learning.

Benefits of technology

It improves the accuracy and efficiency of customer churn prediction, avoids the negative impact of data imbalance on prediction results, and achieves efficient minority class sample synthesis and classification effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0003394287660000021
    Figure BDA0003394287660000021
  • Figure BDA0003394287660000041
    Figure BDA0003394287660000041
  • Figure BDA0003394287660000042
    Figure BDA0003394287660000042
Patent Text Reader

Abstract

The present invention discloses a customer churn prediction method based on hybrid sampling. First, customer data is undersampled and oversampled at the same time. When undersampling, the existing undersampling algorithm is used to classify samples that are not helpful. When oversampling, the QCSOMTE algorithm is used to synthesize new samples. Then, the data obtained by undersampling and oversampling are used to perform supervised learning on the SVM to obtain a customer churn prediction model. Finally, the customer churn prediction model can be used to predict whether the customer is a churn customer or a non-churn customer. The present invention can avoid the problem that the imbalance of customer data affects the prediction effect, and has the characteristics of high algorithm efficiency and high prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unbalanced data and customer churn prediction, and in particular to a customer churn prediction method based on mixed sampling. Background Art

[0002] Customer churn prediction is an important issue in customer relationship management. In today's increasingly competitive business environment, customers can easily switch between competitors. Some studies have shown that the cost of acquiring a new customer is usually five to six times the cost of retaining an existing customer. At the same time, long-term customers tend to be less sensitive to competitive marketing campaigns and thus generate higher profits. Therefore, companies are shifting their focus from acquiring new customers to retaining their existing customer base. Accurate customer churn prediction helps companies find potential churners to retain customers and is therefore considered a marketing priority. Customer churn is a low-probability event in most industries, which means that the number of non-churners far exceeds the number of churners. For example, in the telecommunications industry, the monthly churn rate is about 5%. Therefore, customer churn prediction can be formulated as a classification problem with imbalance, where churners belong to the minority class and non-churners belong to the majority class.

[0003] Traditional classification learning algorithms cannot be well applied to imbalanced data sets. In order to improve the classification effect of traditional classification algorithms on minority classes, many solutions have been proposed. Most of the well-known solutions can be roughly divided into two categories: algorithm level and data level. Algorithm level solutions aim to modify existing algorithms to make learning biased towards minority classes, such as deep learning, cost-sensitive learning, and ensemble learning. The data level solution mainly uses resampling to change the number of majority classes or minority classes in the imbalanced data set to balance the data set, and then classify and train the balanced data set. Resampling methods are mainly divided into two categories: undersampling and oversampling. The undersampling algorithm balances the data set by deleting some majority class samples. The most common undersampling algorithm is random undersampling, which randomly deletes some majority class samples in the majority class data set without processing the minority class samples to balance the data set. However, this approach will cause a large number of important samples in the majority class data set to be lost, affecting the effect of the classification algorithm. The oversampling algorithm adopts the strategy of synthesizing minority class samples and generates new minority class samples through different synthesis methods to balance the data set. Among them, the random oversampling algorithm is the simplest synthesis strategy, which balances the data by randomly copying minority class samples and then adding them to the data set. However, this simple synthesis strategy of copying minority class samples can easily cause the disadvantage of overfitting the classifier. Summary of the invention

[0004] The present invention aims to solve the problem that the imbalance of customer data affects the prediction effect, and provides a customer churn prediction method based on mixed sampling.

[0005] To solve the above problems, the present invention is achieved through the following technical solutions:

[0006] The customer churn prediction method based on mixed sampling includes the following steps:

[0007] Step 1: Collect the multi-attribute data of known lost customers and non-lost customers, and add labels of lost customers or non-lost customers to their multi-attribute data according to the type of customers to form sample data;

[0008] Step 2: Classify the sample data labeled as lost customers into the minority sample set, and classify the sample data labeled as non-lost customers into the majority sample set;

[0009] Step 3, under-sampling the majority class sample set to obtain a sampled majority class sample set;

[0010] Step 4: Calculate the difference between the number of sample data of the majority class sample set and the number of sample data of the minority class sample set, and use the difference as the required number of synthetic samples P;

[0011] Step 5: traverse each sample data of the minority class sample set, calculate the Euclidean distance between the current sample data and other sample data in the minority class sample set, and classify the current sample data and the Q other sample data with the closest Euclidean distance into the similar sample set of the current sample data; where Q is a positive integer greater than or equal to 4;

[0012] Step 6: traverse each sample data of the minority class sample set, randomly select 4 sample data from the similar sample set of the current sample data, first calculate the centroid of these 4 sample data, then merge the centroid with these 4 sample data to obtain 4 synthetic sample data, and then classify the synthetic sample data into the synthetic sample data set;

[0013] Step 7: Determine whether the number of synthetic sample data in the synthetic sample data set is equal to the number of synthetic samples P:

[0014] If the number of synthetic sample data in the synthetic sample data set is equal to the number of synthetic samples P, then all the synthetic sample data in the synthetic sample data set are included in the sampled minority class sample set;

[0015] If the number of synthetic sample data in the synthetic sample data set is greater than the number of synthetic samples P, then P synthetic sample data are randomly selected from the synthetic sample data set and included in the sampled minority class sample set;

[0016] If the number of synthetic sample data in the synthetic sample data set is less than the number of synthetic samples P, return to step 6;

[0017] Step 8: The sampled majority class sample set and the sampled minority class sample set are used as the final training set, and the final training set is sent to the support vector machine for training to obtain a customer churn prediction model;

[0018] Step 9: Collect multi-attribute data of the customer to be predicted, and input it into the customer churn prediction model for classification prediction to determine whether the customer to be predicted is a churn customer or a non-churn customer.

[0019] In the above step 2, DBSCAN undersampling or K-Means undersampling is performed on the majority class sample set.

[0020] In step 6 above, the centroid A C for:

[0021]

[0022] In the formula, A ij Represents the jth attribute of the i-th sample data, i = 1, 2, 3, 4, j = 1, 2, ..., n, n is the number of attributes of the sample data.

[0023] In the above step 6, the synthetic sample data A of the i-th sample data i-new for:

[0024] A i-n =A i +rand(0,1)×(A C -A i )

[0025] In the formula, rand(0,1) is a random number between 0 and 1, A i is the i-th sample data, A C is the centroid, i=1,2,3,4.

[0026] In the above steps 1 and 9, the number of attributes of the multi-attribute data is n=3.

[0027] Compared with the prior art, the present invention simultaneously undersamples and oversamples customer data. When undersampling, the existing undersampling algorithm is used to delete outliers or edge samples in the majority class samples that are not helpful for classification, so as to avoid introducing more noise. When oversampling, the QCSOMTE algorithm proposed in the present invention is used to synthesize new samples. The QCSOMTE algorithm uses the method of generating new samples between the centroid and the vertex of the quadrilateral to limit the synthesis area of ​​the sample to the inside of the quadrilateral, which better solves the marginalization problem of sample distribution, and can generate 4 new samples each time, which greatly improves the efficiency of the algorithm. The data obtained by undersampling and oversampling are used to supervise the SVM to obtain a customer churn prediction model. The customer churn prediction model can be used later to predict whether the customer is a churn customer or a non-churn customer. The present invention can avoid the problem that the imbalance of customer data affects the prediction effect, and has the characteristics of high algorithm efficiency and high prediction accuracy. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific examples.

[0029] In the telecommunications industry, there is a widespread problem of data imbalance, which seriously affects the prediction results, making it impossible for telecommunications operators to accurately discover potential churn customers, resulting in a large amount of losses. In order to solve the data imbalance problem of telecommunications customers and improve the prediction performance, this embodiment proposes a customer churn prediction method based on mixed sampling, which specifically includes the following steps:

[0030] Step 1: Collect multi-attribute data of known churned customers and non-churned customers, and add labels of churned customers or non-churned customers to their multi-attribute data according to the type of customers to form sample data.

[0031] According to the characteristics of different fields, key attributes that affect customer churn are selected to form multi-attribute data, and the number of attributes of the multi-attribute data, i.e., the dimension, is n. In this embodiment, according to the characteristics of the telecommunications field, three attributes of the customer's monthly telephone charges, monthly traffic, and monthly call duration are collected to form multi-attribute data. At this time, the number of attributes of the multi-attribute data, i.e., the dimension, is n=3, that is, the number of attributes of the sample data, n=3.

[0032] Step 2: Classify the sample data labeled as lost customers into the minority sample set M, and classify the sample data labeled as non-lost customers into the majority sample set N.

[0033] Step 3: Undersample the majority class sample set N to obtain the sampled majority class sample set N 1 .

[0034] In the present invention, the undersampling algorithm used for the majority class sample set is the DBSCAN undersampling algorithm or the K-Means undersampling algorithm.

[0035] The DBSCAN undersampling method is used for the majority class sample set to delete the marginal samples or outlier samples in the majority class data set. These samples are not only useless for classification, but also cause the need to synthesize too many samples during oversampling, which leads to the introduction of more noise problems. Then, the sampled majority class sample set is used to replace the original majority class. The process of the DBSCAN undersampling algorithm is as follows: First, the sample data is divided into high-density data clusters G0, G1, G2, ..., G by designing the scanning radius (eps) and the minimum number of included points (minpts) by yourself. l and low density data clusters D0,D1,D2,…,D l , l is the number of the data cluster. Through a large number of experiments on different telecom customer data sets, the optimal scanning radius (eps) is 2.5 and the minimum number of included points (minpts) is 10. Then, different treatments are performed on data clusters of different densities: all low-density data clusters D0, D1, D2, ..., D l Delete and set the mean of each high-density data cluster B0, B1, B2, ..., B l Calculate and find the mean value B in each cluster l The most recent sample data is used as the pseudo center C of this cluster l Finally, the sample data closer to the pseudo center in each cluster is retained as the sample set N of the majority class as needed. 1 After a lot of experiments on the telecommunications customer data set, the optimal sampling majority class sample set N is obtained. 1 It is 2.5 times that of minority class samples.

[0036] The K-Means undersampling method is used for the majority class sample set to delete some samples that are not helpful for classification, ensuring that the remaining majority class samples have good quality. Then, the majority class after sampling is used to replace the original majority class sample set, which effectively solves the noise problem caused by too many synthetic samples when using the oversampling method. The process of the K-Means undersampling algorithm is as follows: randomly select K samples from the majority class sample set N as the initial clustering centers for K-Means clustering. After a large number of experiments on the telecommunications customer data set, the optimal K value is 2.5 times the number of minority class samples. Until each cluster no longer changes, K cluster centers are obtained, and the distance from the sample in each cluster to the cluster center is calculated. In each cluster, find a sample closest to the cluster center to replace the entire cluster.

[0037] Step 4: Calculate the sample set N of the majority class 1The difference between the number of sample data in the sample set M and the number of sample data in the minority class sample set M is used as the required number of synthetic samples P.

[0038] Step 5: traverse each sample data of the minority class sample set M, calculate the Euclidean distance between the current sample data and other sample data in the minority class sample set, and classify the current sample data and the Q other sample data with the closest Euclidean distance into the similar sample set of the current sample data. Where Q is a positive integer greater than or equal to 4, and in this embodiment, Q=6.

[0039] For the sample data A={a1,a2,…,a n} and sample data C={c1,c2,…,c n}, where a1, a2, …, a n are the attribute values ​​of the n dimensions of sample A, c1, c2, …, c n are the attribute values ​​of n dimensions of sample C respectively, then the Euclidean distance D between sample data A and sample data C is:

[0040]

[0041] Step 6: traverse each sample data of the minority class sample set M, randomly select 4 sample data from the similar sample set of the current sample data, first calculate the centroid of these 4 sample data, then merge the centroid with these 4 sample data to obtain 4 synthetic sample data, and then classify the synthetic sample data into the synthetic sample data set.

[0042] The QCSMOTE algorithm uses the centroid and vertices of the quadrilateral to generate new samples, limiting the sample synthesis area to the interior of the quadrilateral. The newly synthesized samples better solve the marginalization problem of sample distribution, and can generate 4 new samples each time, which greatly improves the efficiency of the algorithm.

[0043] Centroid A C for:

[0044]

[0045] The synthetic sample data A of the i-th sample data i-n for:

[0046] A i-new =A i +rand(0,1)×(A C -A i )

[0047] In the formula, A ij represents the jth attribute value of the i-th sample data, A i is the i-th sample data, A Cis the centroid, rand(0,1) is a random number between 0 and 1, i=1,2,3,4, j=1,2,…,n, n is the number of attributes of the sample data.

[0048] Step 7: Determine whether the number of synthetic sample data in the synthetic sample data set is equal to the number of synthetic samples P:

[0049] If the number of synthetic sample data in the synthetic sample data set is equal to the number of synthetic samples P, then all the synthetic sample data in the synthetic sample data set are classified into the sampling minority class sample set M. 1 middle;

[0050] If the number of synthetic sample data in the synthetic sample data set is greater than the number of synthetic samples P, then P synthetic sample data are randomly selected from the synthetic sample data set and included in the sampling minority class sample set M. 1 middle;

[0051] If the number of synthetic sample data in the synthetic sample data set is less than the number of synthetic samples P, return to step 6.

[0052] Step 8: Sample the majority class sample set N 1 And sample the minority class sample set M 1 As the final training set, the final training set is sent to the support vector machine (SVM) for training to obtain the customer churn prediction model.

[0053] SVM belongs to supervised learning, that is, a model that performs classification based on known sample labels. Therefore, in step 8, we compare the model's classification results of the data with the actual labels of the data to evaluate the performance of the model.

[0054] Step 9: Collect multi-attribute data of the customer to be predicted, and input it into the customer churn prediction model for classification prediction to determine whether the customer to be predicted is a churn customer or a non-churn customer.

[0055] It should be noted that, although the embodiments of the present invention described above are illustrative, they are not intended to limit the present invention, and therefore the present invention is not limited to the above specific embodiments. Without departing from the principles of the present invention, any other embodiments obtained by those skilled in the art under the guidance of the present invention are deemed to be within the protection of the present invention.

Claims

1. Customer churn prediction method based on mixed sampling, Its characteristics are: The steps include: Step 1: Collect the multi-attribute data of known lost customers and non-lost customers, and add labels of lost customers or non-lost customers to their multi-attribute data according to the type of customers to form sample data; Step 2: Classify the sample data labeled as lost customers into the minority sample set, and classify the sample data labeled as non-lost customers into the majority sample set; Step 3, under-sampling the majority class sample set to obtain a sampled majority class sample set; Step 4: Calculate the difference between the number of sample data of the majority class sample set and the number of sample data of the minority class sample set, and use the difference as the required number of synthetic samples P; Step 5: traverse each sample data of the minority class sample set, calculate the Euclidean distance between the current sample data and other sample data in the minority class sample set, and classify the current sample data and the Q other sample data with the closest Euclidean distance into the similar sample set of the current sample data; Where Q is a positive integer greater than or equal to 4; Step 6: traverse each sample data of the minority class sample set, randomly select 4 sample data from the similar sample set of the current sample data, first calculate the centroid of these 4 sample data, then merge the centroid with these 4 sample data to obtain 4 synthetic sample data, and then classify the synthetic sample data into the synthetic sample data set; Step 7: Determine whether the number of synthetic sample data in the synthetic sample data set is equal to the number of synthetic samples P: If the number of synthetic sample data in the synthetic sample data set is equal to the number of synthetic samples P, then all the synthetic sample data in the synthetic sample data set are included in the sampled minority class sample set; If the number of synthetic sample data in the synthetic sample data set is greater than the number of synthetic samples P, then P synthetic sample data are randomly selected from the synthetic sample data set and included in the sampled minority class sample set; If the number of synthetic sample data in the synthetic sample data set is less than the number of synthetic samples P, return to step 6; Step 8: The sampled majority class sample set and the sampled minority class sample set are used as the final training set, and the final training set is sent to the support vector machine for training to obtain a customer churn prediction model; Step 9: Collect multi-attribute data of the customer to be predicted, and input it into the customer churn prediction model for classification prediction to determine whether the customer to be predicted is a churn customer or a non-churn customer.

2. The customer churn prediction method based on mixed sampling according to claim 1, Its characteristics are: In step 2, DBSCAN undersampling or K-Means undersampling is performed on the majority class sample set.

3. The customer churn prediction method based on mixed sampling according to claim 1, Its characteristics are: In step 6, the centroid A C for: In the formula, A ij Represents the jth attribute of the i-th sample data, i = 1, 2, 3, 4, j = 1, 2, ..., n, n is the number of attributes of the sample data.

4. The customer churn prediction method based on mixed sampling according to claim 1, Its characteristics are: In step 6, the synthetic sample data A of the i-th sample data i-new for: A i-new =A i +rand(0,1)×(A C -A i ) In the formula, rand(0,1) is a random number between 0 and 1, A i is the i-th sample data, A C is the centroid, i=1,2,3,4.

5. The customer churn prediction method based on mixed sampling according to claim 1, Its characteristics are: In step 1 and step 9, the number of attributes of the multi-attribute data is n=3.