Credit card account cancellation prediction model and construction method thereof
By building a credit card account cancellation prediction model, using the TBPU learning method and LightGBM model to combine dynamic pseudo-label generation and multi-level feature selection, the problem that traditional methods are difficult to accurately predict credit card account cancellation behavior, and high-precision prediction and customer management effects are achieved.
Patent Information
- Application Number
- CN202510385083.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional credit card customer management relies on empirical judgment and simple statistical analysis, and it is difficult to predict the account cancellation behavior of credit card customers in a timely and accurate manner, resulting in banks facing the problem of high customer churn rate.
A credit card account cancellation prediction model is adopted, which includes modules such as data preparation, data preprocessing, feature engineering, data screening, model training and prediction evaluation. Specific steps include obtaining data, processing outliers and missing values, feature filtering and coding, similarity analysis and screening, TBPU learning methods and LightGBM model training, and out-of-bag prediction strategies to generate final prediction results.
Through in-depth mining and analysis of customer behavior data, accurate predictions of high-intention account cancellation customers are achieved, which improves the accuracy and real-timeness of credit card account cancellation forecasts, helps banks take targeted measures to reduce customer churn rate, improve customer loyalty and bank returns.
Smart Images

Figure CN119887378A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of prediction models, and in particular to a credit card account cancellation prediction model and a construction method thereof. Background Art
[0002] The development of retail business has provided a new option for improving bank performance, and has officially become an important source of income for many banks, and is the top priority of strategic transformation for many banks. Compared with traditional retail business, the credit card business model is simpler, and the scenarios and profit models that can be developed are more diverse.
[0003] However, with the rapid growth of the number of bank credit card customers, the problem of customer churn (i.e., credit card account cancellation) has brought great challenges to bank revenue and long-term development. Traditional customer management relies more on experience judgment and simple statistical analysis, which makes it difficult to predict credit card customer account cancellation behavior in a timely and accurate manner. Therefore, customer churn prediction based on data mining and machine learning technology has become the key to improving credit card customer retention rate.
[0004] Therefore, it is necessary to provide a credit card account cancellation prediction model and its construction method to improve the accuracy of credit card account cancellation prediction, thereby helping banks take targeted measures to improve customer retention rate. Summary of the invention
[0005] The purpose of the present invention is to provide a credit card account cancellation prediction model and a construction method thereof, so as to improve the accuracy of credit card account cancellation prediction, thereby helping banks to take targeted measures to improve customer retention rate.
[0006] In order to solve the problems existing in the prior art, the present invention provides a credit card account cancellation prediction model, comprising: a data preparation module configured to obtain data; A data preprocessing module is configured to process outliers and missing values in the data; Feature engineering module, including feature screening submodule, feature binning module and feature encoding submodule; The data screening module is configured to use the K-Nearest Neighbors model to perform similarity analysis on existing customers who have not cancelled their accounts, and define a screening range so that existing customers who have not cancelled their accounts and whose similarity falls within the screening range participate in model training; The model training module is configured to use the TBPU learning method, iterative pseudo-label generation strategy, and LightGBM model for training to obtain a credit card cancellation prediction model, where TBPU is Transductive Bagging PU; and introduce an out-of-bag prediction strategy to generate the final prediction result; The prediction evaluation module is configured to evaluate the final prediction results in the following way: Among them, TP represents the number of customers who are actually cancelled and are predicted by the model to be cancelled customers; TN represents the number of customers who are actually not cancelled and are predicted by the model to be not cancelled customers; FN represents the number of customers who are actually cancelled and are predicted by the model to be not cancelled customers; FP represents the number of customers who are actually not cancelled and are predicted by the model to be cancelled customers; Recall is the recall rate, the F1 score is the harmonic mean of the precision and the recall rate, FRP is the false positive rate, and TPR is the true positive rate.
[0007] Optionally, in the credit card account cancellation prediction model, the acquired data includes the customer's basic information, account information, transaction information and installment information.
[0008] Optionally, in the credit card account cancellation prediction model, Basic information includes gender, age, marital status, and education level; Account information includes the highest card level, number of cards held, credit limit, maximum account age, whether it is activated, whether it has been linked to mobile banking, whether WeChat quick payment has been opened, financial purchases, customer identification, and half-year activity; Transaction information includes transaction times, transaction amounts, online transaction times, offline transaction times, consumption levels, average monthly consumption transaction amounts, average monthly consumption transaction amounts, and activity participation; Installment information includes the number of installments, installment amount, bill installment term preference, the number of monthly consumer transaction installments, and the monthly consumer transaction installment amount.
[0009] Optionally, in the credit card account cancellation prediction model, in the model training module, The TBPU learning method is used to prepare data, and historical account cancellation customers are defined as positive samples, and existing account cancellation customers are defined as unlabeled samples; The Bootstrap resampling method is used to randomly sample the positive samples to generate the subset Ps, and a certain proportion of data is randomly selected from the unlabeled samples as the subset Us; Use the sampled Ps and Us to train the LightGBM model; In each round of training, samples that are not sampled into Ps and Us are used as out-of-bag prediction samples; the LightGBM model in the current training stage is used to predict the out-of-bag prediction samples and generate the prediction probability of the out-of-bag samples; Repeat the training and out-of-bag prediction steps several times, and generate the final prediction result through weighted averaging or voting mechanism for all prediction probabilities obtained in multiple rounds of training.
[0010] The present invention also provides a method for constructing a credit card account cancellation prediction model, comprising the following steps: S1: Get data; S2: Process outliers and missing values in the data; S3: Screen features, and perform binning and encoding on the features; S4: Based on the processed features, the K-Nearest Neighbors model is used to perform similarity analysis on the existing customers who have not cancelled their accounts, and a screening range is defined so that the existing customers who have not cancelled their accounts and whose similarity falls within the screening range can participate in model training; S5: The TBPU learning method, iterative pseudo-label generation strategy and LightGBM model are used for training to obtain a credit card cancellation prediction model, where TBPU is Transductive Bagging PU; and the out-of-bag prediction strategy is introduced to generate the final prediction result; S6: Evaluate the generated prediction results as follows: Among them, TP represents the number of customers who are actually cancelled and are predicted by the model to be cancelled customers; TN represents the number of customers who are actually not cancelled and are predicted by the model to be not cancelled customers; FN represents the number of customers who are actually cancelled and are predicted by the model to be not cancelled customers; FP represents the number of customers who are actually not cancelled and are predicted by the model to be cancelled customers; Recall is the recall rate, the F1 score is the harmonic mean of the precision and the recall rate, FRP is the false positive rate, and TPR is the true positive rate.
[0011] Optionally, in the method for constructing the credit card account cancellation prediction model, the method of filtering features is: filtering and reducing the dimension of initial features.
[0012] Optionally, in the method for constructing the credit card account cancellation prediction model, the step of screening the existing customers who have not cancelled their accounts to participate in model training is as follows: Extract key features from the existing customer data and construct a feature space. The key features include the customer's transaction behavior, account activity, and credit card usage characteristics. The extracted key features were normalized before being input into the K-Nearest Neighbors model; The Euclidean distance is used to measure the similarity between the customer and the historical account cancellation customers. The calculation formula is as follows: Among them, d(x,y) represents the similarity between the customer and the historical account cancellation customers, x i A vector representing the key features of any category of the customer, y i A vector representing the features of historical account cancellation customers, where n represents the total number of key feature categories; Calculate the similarity between the customer and K historical account-closing customers respectively, and take the average of the K similarity values as the comprehensive similarity of the customer; Define the screening range so that existing customers whose similarity falls within the screening range can participate in model training.
[0013] Optionally, in the method for constructing the credit card account cancellation prediction model, the training and prediction methods are as follows: The TBPU learning method is used to prepare data, and historical account cancellation customers are defined as positive samples, and existing account cancellation customers are defined as unlabeled samples; The Bootstrap resampling method is used to randomly sample the positive samples to generate the subset Ps, and a certain proportion of data is randomly selected from the unlabeled samples as the subset Us; Use the sampled Ps and Us to train the LightGBM model; In each round of training, samples that are not sampled into Ps and Us are used as out-of-bag prediction samples; the LightGBM model in the current training stage is used to predict the out-of-bag prediction samples and generate the prediction probability of the out-of-bag samples; Repeat the training and out-of-bag prediction steps several times, and generate the final prediction result through weighted averaging or voting mechanism for all prediction probabilities obtained in multiple rounds of training.
[0014] Compared with the prior art, the present invention has the following advantages: The present invention achieves accurate prediction of customers with high intention to close their accounts through in-depth mining and analysis of customer behavior data. The credit card account closing prediction model is based on positive sample-unlabeled sample learning, combined with dynamic pseudo-label generation and multi-level feature selection to improve prediction accuracy and real-time performance. It is used to help banks achieve targeted intervention in customer management, effectively reduce customer churn rate, improve customer loyalty and bank revenue, and provide innovative solutions for customer relationship management in the field of financial technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A module diagram of a credit card account cancellation prediction model provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0016] The specific implementation of the present invention will be described in more detail below in conjunction with the schematic diagram. The advantages and features of the present invention will become clearer based on the following description. It should be noted that the drawings are all in a very simplified form and are not in exact proportions, and are only used to facilitate and clearly assist in explaining the purpose of the embodiments of the present invention.
[0017] Hereinafter, if the method described herein includes a series of steps, the order in which the steps are presented herein is not necessarily the only order in which the steps may be performed, and some of the steps described may be omitted and / or some other steps not described herein may be added to the method.
[0018] Traditional customer management relies on experience and simple statistical analysis, which makes it difficult to predict credit card customer cancellation behavior in a timely and accurate manner. Therefore, customer churn prediction based on data mining and machine learning technology has become the key to improving credit card customer retention rates.
[0019] The present invention aims to solve the problems of low accuracy and untimely response in traditional credit card customer churn prediction, and proposes a credit card account cancellation prediction model and its construction method. The model predicts the customer's account cancellation tendency in advance by analyzing the data of the customer's historical behavior, thereby helping the bank to take targeted measures to improve the customer retention rate.
[0020] In order to solve the problems existing in the prior art, the present invention provides a credit card account cancellation prediction model, such as Figure 1 As shown, including: (1) a data preparation module, configured to acquire data; In one embodiment, the acquired data includes the customer's basic information, account information, transaction information, and installment information, etc. Among them, the basic information includes gender, age, marital status, and education level, etc.; the account information includes the highest card level, the number of cards held, the credit limit, the maximum account age, whether it is activated, whether it has been bound to mobile banking, whether WeChat quick payment has been opened, financial purchases, customer identification, and half-year activity, etc.; transaction information includes the number of transactions (in the past 6 months), transaction amount (in the past 6 months), the number of online transactions (in the past 3 months), the number of offline transactions (in the past 3 months), consumption level, average monthly consumption transaction amount (in the past 6 months), average monthly consumption transaction amount (in the past 12 months), and activity participation, etc.; installment information includes the number of installments, installment amount (in the past 1 year), bill installment term preference, the number of monthly consumption transaction installments (in the past 6 months), and the monthly consumption transaction installment amount (in the past 6 months).
[0021] The selection of these feature dimensions comprehensively covers core information such as the customer's basic situation, account status, transaction behavior, and installment preference. It can characterize the customer's credit card usage and behavior patterns from multiple angles and provide rich input information for the model.
[0022] (2) A data preprocessing module, configured to process outliers and missing values in the data; Specifically, the data preprocessing module is mainly responsible for the preliminary description and cleaning of the data. The data quality of each bank is uneven, so it is necessary to further clean the data features. Cleaning mainly includes the processing of data outliers and missing values. First, the missing ratio of each field in the statistics is counted. For fields with a large missing ratio, they are filled according to business experience or according to the average value. For fields with a small missing ratio, consider directly eliminating this part of the data. Secondly, outliers have a relatively large impact on the model. The present invention mainly adopts the box plot method to identify outliers and eliminate extreme abnormal data.
[0023] (3) Feature engineering module, including feature screening submodule, feature binning module and feature encoding submodule; to ensure the quality and adaptability of model input data.
[0024] The feature screening submodule mainly screens and reduces the dimension of the initial features through a variety of methods. The present invention mainly calculates the correlation coefficient between features based on the filtering method of correlation. During the screening process, the key features with high predictive power for customer account cancellation tendency are retained, while redundant or noise features are removed. The feature binning module is mainly for continuous features. By establishing a decision tree model for continuous features and target classification variables, the decision tree will traverse all possible splitting points, select the point that minimizes data impurity as the splitting point, and use the splitting node of the decision tree as the binning boundary of the target feature, so that the binning result can better reflect the relationship between the feature and the customer account cancellation behavior. In addition, feature binning can reduce the impact of outliers on the model and reduce the risk of overfitting the model. The feature encoding submodule uses unique hot encoding to discretize discrete variables and retain key information of the data.
[0025] (4) A data screening module, configured to use the K-Nearest Neighbors model to perform similarity analysis on existing customers who have not yet cancelled their accounts, and define a screening range so that existing customers who have not yet cancelled their accounts and whose similarity falls within the screening range participate in model training; The data screening module is an important preprocessing step, which aims to screen out samples with characteristics that are significantly different from those of historically cancelled customers from existing customers, so as to improve the training quality of the model and reduce noise interference.
[0026] Specifically, the steps for screening existing customers who have not yet cancelled their accounts to participate in model training are as follows: S41: Extract key features from the data of existing customers who have not cancelled their accounts and construct a feature space. The key features include the customer's transaction behavior (such as consumption frequency and amount changes), account activity (such as the number of active days in the past 6 months), and credit card usage (such as installment preference and bill payment status). S42: The extracted key features are normalized before being input into the K-Nearest Neighbors model to ensure that features of different dimensions have the same weight for similarity calculation; S43: The calculation of similarity can be based on the following methods: Euclidean distance, cosine similarity and Manhattan distance. The smaller the distance, the more similar the characteristics of the customers who have not cancelled their accounts are to those who have cancelled their accounts. Conversely, the smaller the distance, the less similar they are. In the present invention, Euclidean distance is used to measure similarity, and its calculation formula is as follows: Among them, d(x,y) represents the similarity between the customer and the historical account cancellation customers, x i A vector representing the key features of any category of the customer, y i A vector representing the features of historical account cancellation customers, where n represents the total number of key feature categories; S44: Calculate similarity values between the customer and K historical account-closing customers respectively, and take the average of the K similarity values as the comprehensive similarity of the customer; S45: Define the screening range so that the existing customers whose similarity falls within the screening range can participate in the model training.
[0027] Furthermore, the screening range is defined as follows: according to the calculation results, the similarity scores of the existing customers who have not been cancelled are stratified according to the threshold, and samples with lower similarity scores are retained as "heterogeneous samples", that is, customers who have not been cancelled and are significantly different from cancelled customers, and these samples are used for subsequent model training. In the present invention, the first 60% of samples with lower similarity are retained for model training.
[0028] Preferably, in practical applications, the screening strategy can be dynamically optimized in combination with the effect of the credit card cancellation prediction model. For example, based on the initial screening, the feature weight or similarity screening range can be further adjusted through the feedback of the model training results to improve the screening accuracy. At the same time, the feature space can be expanded to multi-stage screening, first using global features for coarse screening, and then using key features for fine screening, so as to gradually improve the data purity.
[0029] Through the data screening module, samples that are too similar to the characteristic patterns of the cancelled customers can be efficiently removed from the existing customers who have not cancelled their accounts, effectively reducing the noise ratio in the training data and enhancing the model's ability to identify key features. This not only improves the accuracy and robustness of the credit card cancellation prediction model, but also provides a clearer customer stratification basis for the formulation of subsequent intervention strategies.
[0030] (5) Model training module, which is configured to use the TBPU learning method, iterative pseudo-label generation strategy and LightGBM model for training to obtain a credit card cancellation prediction model, where TBPU is Transductive Bagging PU; and introduce the out-of-bag prediction strategy to generate the final prediction result; Furthermore, in the model training module, S51: Prepare data using the TBPU learning method, define historical account cancellation customers as positive samples, and define existing account cancellation customers as unlabeled samples; from the perspective of feature similarity, unlabeled samples may contain positive samples and negative samples. Standardize the positive samples and unlabeled samples to ensure that each feature is within a unified numerical range. The present invention makes full use of unlabeled samples to improve the model's ability to predict customer account cancellation behavior.
[0031] S52: Using the Bootstrap resampling method, randomly sample from the positive samples to generate a subset Ps, and randomly select a certain proportion of data from the unlabeled samples as the subset Us; Ps represents the positive samples involved in the training, and Us is a potential negative sample, but its label has not yet been determined.
[0032] S53: Use the sampled Ps and Us to train the LightGBM model; during the training process, it is initially assumed that Us is a negative sample, and the classification performance of the model is optimized based on this assumption.
[0033] S54: In each round of training, samples that are not sampled into Ps and Us are used as out-of-bag prediction samples; the LightGBM model of the current training stage is used to predict the out-of-bag prediction samples and generate the prediction probability of the out-of-bag samples; S55: Repeat the training and out-of-bag prediction steps several times, and generate the final prediction results through weighted average method or voting mechanism for all the prediction probabilities obtained in multiple rounds of training, and judge whether to continue training based on the evaluation of the prediction results. The weighted average method or voting mechanism effectively reduces the overfitting and noise effects that may be caused by a single training, and improves the prediction stability.
[0034] Through the deep combination of the TBPU method and the LightGBM model, the present invention not only fully mines the unlabeled sample information, but also significantly improves the prediction accuracy of the credit card account cancellation prediction model on the customer account cancellation tendency, providing more intelligent technical support for bank customer churn management.
[0035] (6) Prediction evaluation module, configured to evaluate the final prediction results in the following way: Among them, TP represents the number of customers who are actually cancelled and the model predicts that they are cancelled; TN represents the number of customers who are actually not cancelled and the model predicts that they are not cancelled; FN represents the number of customers who are actually cancelled and the model predicts that they are not cancelled; FP represents the number of customers who are actually not cancelled and the model predicts that they are cancelled; Recall is the recall rate, also known as the true positive rate, which indicates the ability of the model to identify the positive class. It is the proportion of all actual positive classes that are correctly classified as positive by the model. The F1 score is the harmonic mean of the precision rate and the recall rate. The larger the value, the better the overall performance of the model. FPR is the false positive rate, which indicates the proportion of all samples that are actually negative that are incorrectly classified as positive. TPR is the true positive rate, which indicates the proportion of all samples that are actually negative that are correctly classified as negative.
[0036] Furthermore, the present invention uses the SHAP package to analyze the importance of features of the credit card account cancellation prediction model to further improve the interpretability and credibility of the model.
[0037] The present invention also provides a method for constructing a credit card account cancellation prediction model, comprising the following steps: S1: Get data; In one embodiment, the acquired data includes the customer's basic information, account information, transaction information, and installment information, etc. Among them, the basic information includes gender, age, marital status, and education level, etc.; the account information includes the highest card level, the number of cards held, the credit limit, the maximum account age, whether it is activated, whether it has been bound to mobile banking, whether WeChat quick payment has been opened, financial purchases, customer identification, and half-year activity, etc.; transaction information includes the number of transactions (in the past 6 months), transaction amount (in the past 6 months), the number of online transactions (in the past 3 months), the number of offline transactions (in the past 3 months), consumption level, average monthly consumption transaction amount (in the past 6 months), average monthly consumption transaction amount (in the past 12 months), and activity participation, etc.; installment information includes the number of installments, installment amount (in the past 1 year), bill installment term preference, the number of monthly consumption transaction installments (in the past 6 months), and the monthly consumption transaction installment amount (in the past 6 months).
[0038] The selection of these feature dimensions comprehensively covers core information such as the customer's basic situation, account status, transaction behavior, and installment preference. It can characterize the customer's credit card usage and behavior patterns from multiple angles and provide rich input information for the model.
[0039] S2: Process outliers and missing values in the data; Specifically, the main work is to make a preliminary description and clean the data. The data quality of each bank is uneven, so it is necessary to further clean the data features. Cleaning mainly includes the processing of data outliers and missing values. First, the missing ratio of each field in the statistics is counted. For fields with a large missing ratio, fill them according to business experience or according to the average value. For fields with a small missing ratio, consider directly eliminating this part of the data. Secondly, outliers have a relatively large impact on the model. The present invention mainly adopts the box plot method to identify outliers and eliminate extreme abnormal data.
[0040] S3: Screen features, bin and encode them to ensure the quality and adaptability of the model input data.
[0041] Feature screening mainly uses a variety of methods to screen and reduce the dimension of the initial features. The present invention is mainly based on the correlation filtering method to calculate the correlation coefficient between features. During the screening process, the key features with high predictive power for customer account cancellation tendencies are retained, while redundant or noise features are removed. Feature binning is mainly for continuous features. By establishing a decision tree model for continuous features and target categorical variables, the decision tree will traverse all possible splitting points, select the point that minimizes data impurity as the splitting point, and use the splitting node of the decision tree as the binning boundary of the target feature, so that the binning result can better reflect the relationship between the feature and the customer's account cancellation behavior. In addition, feature binning can reduce the impact of outliers on the model and reduce the risk of overfitting the model. Feature encoding uses unique hot encoding to discretize discrete variables and retain key information of the data.
[0042] S4: Based on the processed features, the K-Nearest Neighbors model is used to perform similarity analysis on the existing customers who have not cancelled their accounts, and a screening range is defined so that the existing customers who have not cancelled their accounts and whose similarity falls within the screening range can participate in model training; Specifically, the steps for screening existing customers who have not yet cancelled their accounts to participate in model training are as follows: S41: Extract key features from the data of existing customers who have not cancelled their accounts and construct a feature space. The key features include the customer's transaction behavior (such as consumption frequency and amount changes), account activity (such as the number of active days in the past 6 months), and credit card usage (such as installment preference and bill payment status). S42: The extracted key features are normalized before being input into the K-Nearest Neighbors model to ensure that features of different dimensions have the same weight for similarity calculation; S43: The calculation of similarity can be based on the following methods: Euclidean distance, cosine similarity and Manhattan distance. The smaller the distance, the more similar the characteristics of the customers who have not cancelled their accounts are to those who have cancelled their accounts. Conversely, the smaller the distance, the less similar they are. In the present invention, Euclidean distance is used to measure similarity, and its calculation formula is as follows: Among them, d(x,y) represents the similarity between the customer and the historical account cancellation customers, x i A vector representing the key features of any category of the customer, y i A vector representing the features of historical account cancellation customers, where n represents the total number of key feature categories; S44: Calculate similarity values between the customer and K historical account-closing customers respectively, and take the average of the K similarity values as the comprehensive similarity of the customer; S45: Define the screening range so that the existing customers whose similarity falls within the screening range can participate in the model training.
[0043] Furthermore, the screening range is defined as follows: according to the calculation results, the similarity scores of the existing customers who have not been cancelled are stratified according to the threshold, and samples with lower similarity scores are retained as "heterogeneous samples", that is, customers who have not been cancelled and are significantly different from cancelled customers, and these samples are used for subsequent model training. In the present invention, the first 60% of samples with lower similarity are retained for model training.
[0044] Preferably, in practical applications, the screening strategy can be dynamically optimized in combination with the effect of the credit card cancellation prediction model. For example, based on the initial screening, the feature weight or similarity screening range can be further adjusted through the feedback of the model training results to improve the screening accuracy. At the same time, the feature space can be expanded to multi-stage screening, first using global features for coarse screening, and then using key features for fine screening, so as to gradually improve the data purity.
[0045] S5: The TBPU learning method, iterative pseudo-label generation strategy and LightGBM model are used for training to obtain a credit card cancellation prediction model, where TBPU is Transductive Bagging PU; and the out-of-bag prediction strategy is introduced to generate the final prediction result; Specifically, S51: Prepare data using the TBPU learning method, define historical account cancellation customers as positive samples, and define existing account cancellation customers as unlabeled samples; from the perspective of feature similarity, unlabeled samples may include positive samples and negative samples. Standardize the positive samples and unlabeled samples to ensure that each feature is within a unified numerical range. The present invention makes full use of unlabeled samples to improve the model's ability to predict customer account cancellation behavior.
[0046] S52: Using the Bootstrap resampling method, randomly sample from the positive samples to generate a subset Ps, and randomly select a certain proportion of data from the unlabeled samples as the subset Us; Ps represents the positive samples involved in the training, and Us is a potential negative sample, but its label has not yet been determined.
[0047] S53: Use the sampled Ps and Us to train the LightGBM model; during the training process, it is initially assumed that Us is a negative sample, and the classification performance of the model is optimized based on this assumption.
[0048] S54: In each round of training, samples that are not sampled into Ps and Us are used as out-of-bag prediction samples; the LightGBM model of the current training stage is used to predict the out-of-bag prediction samples and generate the prediction probability of the out-of-bag samples; S55: Repeat the training and out-of-bag prediction steps several times, and generate the final prediction results through weighted average method or voting mechanism for all the prediction probabilities obtained in multiple rounds of training, and judge whether to continue training based on the evaluation of the prediction results. The weighted average method or voting mechanism effectively reduces the overfitting and noise effects that may be caused by a single training, and improves the prediction stability.
[0049] S6: Evaluate the generated prediction results as follows: Among them, TP represents the number of customers who are actually cancelled and the model predicts that they are cancelled; TN represents the number of customers who are actually not cancelled and the model predicts that they are not cancelled; FN represents the number of customers who are actually cancelled and the model predicts that they are not cancelled; FP represents the number of customers who are actually not cancelled and the model predicts that they are cancelled; Recall is the recall rate, also known as the true positive rate, which indicates the ability of the model to identify the positive class. It is the proportion of all actual positive classes that are correctly classified as positive by the model. The F1 score is the harmonic mean of the precision rate and the recall rate. The larger the value, the better the overall performance of the model. FPR is the false positive rate, which indicates the proportion of all samples that are actually negative that are incorrectly classified as positive. TPR is the true positive rate, which indicates the proportion of all samples that are actually negative that are correctly classified as negative.
[0050] S7: Feature Importance Analysis This paper uses the SHAP package to analyze the importance of features in the credit card account cancellation prediction model to further improve the model's interpretability and credibility. Through the SHAP value, the impact of each feature on the likelihood of customer account cancellation can be quantified, and the positive and negative contributions of the feature to the prediction results can be visualized, thereby helping banks to more intuitively understand the key factors of customer behavior and providing a scientific basis for specifying personalized intervention strategies.
[0051] In summary, compared with the prior art, the present invention has the following advantages: The present invention achieves accurate prediction of customers with high intention to close their accounts through in-depth mining and analysis of customer behavior data. The credit card account closing prediction model is based on positive sample-unlabeled sample learning, combined with dynamic pseudo-label generation and multi-level feature selection to improve prediction accuracy and real-time performance. It is used to help banks achieve targeted intervention in customer management, effectively reduce customer churn rate, improve customer loyalty and bank revenue, and provide innovative solutions for customer relationship management in the field of financial technology.
[0052] The above is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any technician in the relevant technical field, without departing from the scope of the technical solution of the present invention, makes any form of equivalent replacement or modification to the technical solution and technical content disclosed in the present invention, which does not depart from the content of the technical solution of the present invention and still falls within the protection scope of the present invention.
Claims
1. A credit card account cancellation prediction model, characterized in that: include: a data preparation module configured to obtain data; A data preprocessing module is configured to process outliers and missing values in the data; Feature Engineering Module, It includes feature screening submodule, feature binning module and feature encoding submodule; The data screening module is configured to use the K-Nearest Neighbors model to perform similarity analysis on existing customers who have not cancelled their accounts, and define a screening range so that existing customers who have not cancelled their accounts and whose similarity falls within the screening range participate in model training; The model training module is configured to use the TBPU learning method, iterative pseudo-label generation strategy, and LightGBM model for training to obtain a credit card cancellation prediction model, where TBPU is Transductive Bagging PU; and introduce an out-of-bag prediction strategy to generate the final prediction result; The prediction evaluation module is configured to evaluate the final prediction results in the following way: Among them, TP represents the number of customers who are actually cancelled and are predicted by the model to be cancelled customers; TN represents the number of customers who are actually not cancelled and are predicted by the model to be not cancelled customers; FN represents the number of customers who are actually cancelled and are predicted by the model to be not cancelled customers; FP represents the number of customers who are actually not cancelled and are predicted by the model to be cancelled customers; Recall is the recall rate, the F1 score is the harmonic mean of the precision and the recall rate, FRP is the false positive rate, and TPR is the true positive rate.
2. The credit card account cancellation prediction model according to claim 1, characterized in that: The data obtained includes the customer’s basic information, account information, transaction information, and installment information.
3. The credit card account cancellation prediction model according to claim 2, characterized in that: Basic information includes gender, age, marital status, and education level; Account information includes the highest card level, number of cards held, credit limit, maximum account age, whether it is activated, whether it has been linked to mobile banking, whether WeChat quick payment has been opened, financial purchases, customer identification, and half-year activity; Transaction information includes transaction times, transaction amounts, online transaction times, offline transaction times, consumption levels, average monthly consumption transaction amounts, average monthly consumption transaction amounts, and activity participation; Installment information includes the number of installments, installment amount, bill installment term preference, the number of monthly consumer transaction installments, and the monthly consumer transaction installment amount.
4. The credit card account cancellation prediction model according to claim 1, characterized in that: In the model training module, The TBPU learning method is used to prepare data, and historical account cancellation customers are defined as positive samples, and existing account cancellation customers are defined as unlabeled samples; The Bootstrap resampling method is used to randomly sample the positive samples to generate the subset Ps, and a certain proportion of data is randomly selected from the unlabeled samples as the subset Us; Use the sampled Ps and Us to train the LightGBM model; In each round of training, samples that are not sampled into Ps and Us are used as out-of-bag prediction samples; Use the LightGBM model in the current training stage to predict the out-of-bag prediction samples and generate the prediction probability of the out-of-bag samples; Repeat the training and out-of-bag prediction steps several times, and generate the final prediction result through weighted averaging or voting mechanism for all prediction probabilities obtained in multiple rounds of training.
5. A method for constructing a credit card account cancellation prediction model, characterized in that: The following steps are involved: S1: Get data; S2: Process outliers and missing values in the data; S3: Screen features, and perform binning and encoding on the features; S4: Based on the processed features, the K-Nearest Neighbors model is used to perform similarity analysis on the existing customers who have not cancelled their accounts, and a screening range is defined so that the existing customers who have not cancelled their accounts and whose similarity falls within the screening range participate in model training; S5: The TBPU learning method, iterative pseudo-label generation strategy and LightGBM model are used for training to obtain a credit card cancellation prediction model, where TBPU is Transductive Bagging PU; and the out-of-bag prediction strategy is introduced to generate the final prediction result; S6: Evaluate the generated prediction results as follows: Among them, TP represents the number of customers who are actually cancelled and are predicted by the model to be cancelled customers; TN represents the number of customers who are actually not cancelled and are predicted by the model to be not cancelled customers; FN represents the number of customers who are actually cancelled and are predicted by the model to be not cancelled customers; FP represents the number of customers who are actually not cancelled and are predicted by the model to be cancelled customers; Recall is the recall rate, the F1 score is the harmonic mean of the precision and the recall rate, FRP is the false positive rate, and TPR is the true positive rate.
6. The method for constructing a credit card account cancellation prediction model according to claim 5, characterized in that: The method of filtering features is to filter and reduce the dimension of the initial features.
7. The method for constructing a credit card account cancellation prediction model according to claim 5, characterized in that: The steps to screen existing customers who have not yet closed their accounts for model training are as follows: Extract key features from the existing customer data and construct a feature space. The key features include the customer's transaction behavior, account activity, and credit card usage characteristics. The extracted key features were normalized before being input into the K-Nearest Neighbors model; The Euclidean distance is used to measure the similarity between the customer and the historical account cancellation customers. The calculation formula is as follows: Among them, d(x,y) represents the similarity between the customer and the historical account cancellation customers, x i A vector representing the key features of any category of the customer, y i A vector representing the features of historical account cancellation customers, where n represents the total number of key feature categories; Calculate the similarity between the customer and K historical account-closing customers respectively, and take the average of the K similarity values as the comprehensive similarity of the customer; Define the screening range so that existing customers whose similarity falls within the screening range can participate in model training.
8. The method for constructing a credit card account cancellation prediction model according to claim 7, characterized in that: The training and prediction methods are as follows: The TBPU learning method is used to prepare data, and historical account cancellation customers are defined as positive samples, and existing account cancellation customers are defined as unlabeled samples; The Bootstrap resampling method is used to randomly sample the positive samples to generate the subset Ps, and a certain proportion of data is randomly selected from the unlabeled samples as the subset Us; Use the sampled Ps and Us to train the LightGBM model; In each round of training, samples that are not sampled into Ps and Us are used as out-of-bag prediction samples; Use the LightGBM model in the current training stage to predict the out-of-bag prediction samples and generate the prediction probability of the out-of-bag samples; Repeat the training and out-of-bag prediction steps several times, and generate the final prediction result through weighted averaging or voting mechanism for all prediction probabilities obtained in multiple rounds of training.