Risk control scene-based multi-branch decision tree segmentation method and system
By adopting a multi-fork decision tree slicing method based on risk control scenarios in financial risk control, the problem of high algorithm complexity caused by data accuracy error and sample size increase in the prior art is solved, and a more accurate and efficient credit decision tree model is achieved.
Patent Information
- Application Number
- CN202411871554.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-29
AI Technical Summary
The existing technology has data accuracy errors in financial risk control that affect the selection of slitting points of decision trees, resulting in poor model effectiveness. When the sample size increases, the algorithm is complex, low search efficiency, and slow modeling speed.
A multi-fork decision tree slicing method based on risk control scenarios is adopted. By obtaining historical customer data from credit institutions, data processing and sampling are carried out, the processed data set is established, and the numerical, character and Boolean predictor variables are sliced using multi-fork tree slicing technology.
It improves the accuracy and efficiency of the decision tree model, can divide customer data more carefully, provide more refined and personalized credit decision guidance, reduce credit risks and improve credit efficiency.
Smart Images

Figure CN119903427A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a multi-bifurcation decision tree segmentation method and system based on risk control scenarios. Background Art
[0002] Financial risk control refers to the process of identifying, evaluating and managing the various risks that financial institutions face in the course of their operations. Financial risks include market risk, credit risk, operational risk and liquidity risk, which may have a negative impact on the profitability, capital adequacy and reputation of financial institutions. The goal of financial risk control is to reduce the risk exposure of financial institutions, protect the interests of investors and customers, and maintain the stable operation of financial markets; in order to achieve this goal, financial institutions take a series of measures, including risk assessment, risk monitoring, risk management and risk response. Risk assessment is to assess the credit risk of customers by analyzing their credit records, financial status and trading behaviors. Risk monitoring is to track changes in the financial market in real time, identify potential risk factors and issue alarms. Risk management is to formulate risk control strategies and rules to ensure that financial institutions can take appropriate measures to respond when faced with risks. Risk response is to take timely measures to limit risk losses and resume normal operations when risk events occur.
[0003] In the process of financial risk control, the application of technology plays an important role. Technologies such as artificial intelligence, big data analysis and machine learning can help financial institutions identify and predict risks more accurately and improve the efficiency and accuracy of risk management. At the same time, financial regulators have also increased their supervision of financial risk control, requiring financial institutions to establish a sound risk management system to ensure the stability and security of the financial market.
[0004] In the field of financial risk control technology, there are scenarios where different customer groups need to be divided according to credit history information such as customer behavior and consumption habits, and risk levels need to be evaluated. Decision trees play an important role in credit strategy development because of their intuitiveness and strong interpretability. When searching for split conditions for continuous features, the traditional CART decision tree regards each value as a discrete value; after sorting the values, the average of two adjacent sample values is taken as a potential split point, which divides the original data set into two parts; the weighted Gini coefficient of each possible split is calculated to obtain the sum of the branches, and the one with the smallest Gini coefficient is selected after comparison. For discrete attributes, all possible split combinations are searched to select the optimal split. There are two problems with traditional approaches: 1) Errors caused by data accuracy and other reasons will affect the selection of split points, thereby affecting the model effect, and variables often only need to consider a limited number of digits in actual use scenarios; 2) When the sample size increases rapidly, the algorithm complexity will be greatly increased, and there will be problems of low search efficiency and slow modeling speed, and in practice not every value has a practical meaning. In addition, in business scenarios in the field of credit risk control, for some continuous variables such as age and income, interval division is usually more meaningful than examining the single value of the variable.
[0005] Prior art 1, application number: CN202110135177.2 discloses a crowd portrait extraction method, system, device and computer-readable medium coupled with a decision tree. The crowd portrait extraction method includes: a decision tree generation step, randomly generating a decision tree from a given data set and variable space; a feature extraction step, extracting the rule path in each decision tree and the hit rate, target variable response rate, and target variable mean of each intermediate node and leaf node; and outputting the number of repeated uses and high-frequency intervals of each variable in the feature space at the same time; a crowd portrait generation step, extracting the target population completely automatically according to the user's business needs, and summarizing the crowd portrait. Although the target population can be extracted completely automatically according to the user's business needs, and the crowd portrait can be summarized; compared with the empirical method, it can accommodate more feature spaces and take into account a certain degree of interpretability, and has universal value in the fields of financial risk control and data operation. However, the data accuracy contained in the data set is crossed, resulting in a large error in the selection of the splitting point of the decision tree, and thus the efficiency of feature extraction.
[0006] Prior art 2, application number: CN202210728479.5 discloses a method, device, equipment, storage medium and program product for determining a feature combination, the method comprising: obtaining a user sample data set containing multiple user features and sample results; representing the user sample data in the user sample data set as an N-layer decision tree, and determining the target leaf node with the highest bad ratio threshold on the N-layer decision tree, N is a positive integer, and each layer in the N-layer decision tree is split based on a user feature; determining the feature combination corresponding to the target leaf node as a candidate risk control rule; determining the target risk control rule based on the candidate risk control rule. Although the screening efficiency of determining the feature combination that can be effectively used for risk control is improved. However, when the sample size increases rapidly, it is easy to reduce the efficiency of the decision tree and affect the efficiency of the feature combination.
[0007] Prior art three, application number: CN202211122890.4 discloses a method, device and electronic device for determining a feature set, obtaining training data of a first object in a target scene; constructing a target decision tree based on the training data, wherein a node in the target decision tree corresponds to an object feature in the target scene; obtaining object features under the path from the root node to the non-root node in the target decision tree, and obtaining N feature sets, wherein a feature set includes each object feature under the path from the root node to a non-root node; determining weight information of the N feature sets based on the training data; determining a target feature set from the N feature sets based on the weight information, and the target feature set is used to classify the second object based on the data of the second object in the target scene. Although the classification effect of the feature set is improved, and the determination efficiency of the feature set can be improved; however, there are problems of low search efficiency and slow feature set determination speed.
[0008] At present, the existing technologies 1, 2 and 3 have errors caused by data accuracy and other reasons that affect the selection of split points, thereby affecting the model effect; when the sample size increases rapidly, the algorithm complexity increases significantly, and there are problems such as low search efficiency and slow modeling speed. Therefore, the present invention provides a multi-fork decision tree splitting method and system based on risk control scenarios, which considers more needs and experiences in real business environments and integrates them into the model. Summary of the invention
[0009] In order to solve the above technical problems, the present invention provides a multi-bifurcation decision tree segmentation method and system based on risk control scenarios, comprising the following steps:
[0010] Obtain historical customer data from credit institutions, process and sample the data according to business scenarios, and obtain the original data set;
[0011] Based on the original data set, keep the numerical variables unchanged, process the character and Boolean predictor variables, and obtain the processed data set;
[0012] Based on the processed data set, the numerical variables, character and Boolean predictor variables are split into multi-branch trees according to the specified method and the specified number of branches.
[0013] Preferably, the process of obtaining the original data set includes the following steps:
[0014] Adjust the data type of the prediction variable according to the business scenario; the prediction variable can be numeric, character, or Boolean; perform stratified sampling based on the proportion of each type of sample in the historical customer data, and each sample of the historical customer data has a weight;
[0015] The sampled data is divided into a training set and a test set based on time series partitioning; the training set is used for training and parameter estimation of the decision tree model, and the test set is used to verify the effect and performance of the decision tree model;
[0016] Use the training set to train the decision tree model and estimate its parameters; weight the samples according to the weight variable.
[0017] Preferably, the process of dividing the sampled data into a training set and a test set comprises the following steps:
[0018] Determine the time point for dividing the training set and the test set, divide the time series customer historical data according to the determined time point, use the data before the time point as the training set, and the data after the time point as the test set;
[0019] Perform seasonal-trend decomposition on the training set, decomposing the time series customer historical data into seasonal component and trend component; input the seasonal component and trend component in the training set into the reversible instance normalization layer respectively, and convert them into mean-centered distribution;
[0020] The seasonal term component and trend term component of the mean center distribution are input into the Legendre projection unit respectively, and the time series representation vector is dynamically updated to obtain key historical information; the representation vectors of the seasonal term component and trend term component are input into the multi-layer perceptron neural network respectively to complete the mapping from the representation vector of the historical input sequence to the representation vector of the future sequence;
[0021] Input the representation vectors of the seasonal component and the trend component of the future sequence customer historical data into the reconstruction unit in the Legendre projection unit respectively, and reconstruct the representation vector into the form of the original input by multiplying by the discrete Legendre polynomial matrix;
[0022] The seasonal item component and trend item component of the reconstructed future sequence customer historical data are input into the reversible instance denormalization layer to restore them to their original distribution; the seasonal item component and trend item component of the obtained future sequence customer historical data are combined to obtain the final output future sequence customer historical data; and the prediction results of the future sequence customer historical data in the training set and the test set based on time series division are obtained.
[0023] Preferably, the process of obtaining the processed data set comprises the following steps:
[0024] Based on the data of the training set in the original customer historical data, calculate the odds of each value corresponding to each predictor variable;
[0025] For each predictor variable, sort the original values from small to large according to the odds of the values, obtain the rank corresponding to each value, and establish a discrete attribute mapping table;
[0026] By mapping the original value data to the rank, the original customer historical data is converted into numerical data for building a decision tree model.
[0027] Preferably, the process of converting the original customer historical data into numerical data includes the following steps:
[0028] Calculate odds for each predictor variable: For each predictor variable, calculate the odds corresponding to each value; by calculating odds, evaluate the historical credit status of customers with different values. The higher the odds, the better the credit status of the customer corresponding to the value.
[0029] For each predictor variable, sort the original values from small to large according to the odds of the values; arrange the values according to their corresponding credit status;
[0030] According to the sorted values, a rank is assigned to each value, and a discrete attribute mapping table is established; the rank refers to the sequential position of the value after sorting, which is used to represent the relative credit status of the value; according to the discrete attribute mapping table, the discrete attributes in the original customer history data are mapped to numerical types; by using the rank corresponding to each value, the discrete attributes are converted into numerical types.
[0031] Preferably, Odds refers to the ratio of the number of people who repay normally to the number of people with overdue payment behavior in the customer data corresponding to each category.
[0032] Preferably, the process of dividing the credit sample by multi-branch tree segmentation includes the following steps:
[0033] Based on the current node data, traverse all feasible split points of each variable and select the split point with the largest Gini gain as the optimal split of the variable;
[0034] Traverse all variables of the current node. If there is a feasible split point, based on the optimal split of each variable, select the variable with the largest Gini gain to divide the population, generate the lower-level nodes, and obtain two different populations.
[0035] Preferably, the Gini gain is calculated as follows:
[0036] The Gini Gain obtained by dividing sample D according to feature A is:
[0037] Gini_Gain A (D) = Gini(D) - Gini(D|A = a)
[0038] Gini(D) is the Gini coefficient of data set D, formula:
[0039]
[0040] Gini(D|A=a) is the Gini coefficient after division, formula:
[0041]
[0042] Where n is the number of categories in the dataset D, p(y i ) is the category y in the dataset D i The proportion of samples with "good" target variable in dataset D; a represents a certain value of feature variable A, which is used to divide dataset D into two subsets; Gini(D|A=a): Gini coefficient of the divided subsets under the condition that the value of feature variable A is a; where |D1| and |D2| represent the number of samples in the two divided subsets, respectively, and Gini(D1) and Gini(D2) represent the Gini coefficient of the two divided subsets; good_rate represents the proportion of samples with "good" target variable in dataset D; bad_rate: The proportion of samples with "bad" target variable in dataset D; Gini(D|A=a) is the Gini coefficient of the divided subsets under the condition that the value of feature A is a. Gini_Gain A The larger (D) is, the greater the role that feature A plays in sample classification.
[0043] Preferably, the process of performing multi-branch tree segmentation in a specified manner and with a specified number of branches comprises the following steps:
[0044] Select the multi-branch tree segmentation method and number of branches based on actual needs; segmentation methods include: equal frequency segmentation, equal distance segmentation and Gini segmentation;
[0045] Split the variable based on the specified method and the specified number of branches;
[0046] For discrete and Boolean attributes, the original values corresponding to the split points are found based on the obtained discrete attribute mapping table, and the discrete values contained in each branch are determined.
[0047] The present invention provides a multi-bifurcation decision tree segmentation system based on risk control scenarios, comprising:
[0048] The data acquisition module is responsible for obtaining historical customer data from credit institutions, processing and sampling the data according to business scenarios, and obtaining the original data set;
[0049] The data processing module is responsible for processing character and Boolean predictor variables based on the original data set, keeping the numerical variables unchanged, and obtaining the processed data set;
[0050] The splitting execution module is responsible for performing multi-branch tree splitting on numerical variables, character and Boolean prediction variables in a specified manner and with a specified number of branches based on the processed data set.
[0051] The present invention obtains historical customer data from a credit institution, processes and samples the data according to business scenarios, obtains an original data set, obtains historical customer data under a credit scenario, and performs necessary preprocessing and sampling to ensure the data quality and representativeness of subsequent modeling; provides a necessary data basis for establishing a risk control model, and helps to evaluate and predict customer credit risk. Based on the original data set, the numerical variables are kept unchanged, the character and Boolean prediction variables are processed to obtain a processed data set, the data is preprocessed, the format consistency and availability of the data are ensured, and preparations are made for subsequent model building; the data is converted into a format that can be processed by the model, the noise and inconsistency in the data are eliminated, and the efficiency and accuracy of modeling are improved. Based on the processed data set, the numerical variables, character and Boolean prediction variables are segmented by a multi-fork tree according to a specified method and a specified number of branches; the data are segmented and classified using a decision tree model, and complex decision rules are constructed, thereby achieving accurate prediction of customer credit risk. Its significance lies in that through the multi-fork tree segmentation method, customer data can be subdivided into different categories, providing more refined and personalized guidance for credit decision-making, effectively reducing credit risk and improving credit efficiency.
[0052] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0053] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0055] Figure 1 This is a flow chart of a multi-bifurcation decision tree segmentation method based on a risk control scenario in Example 1 of the present invention;
[0056] Figure 2 This is a diagram of the process of obtaining the original data set in Example 2 of the present invention;
[0057] Figure 3 A process diagram of dividing the sampled data into a training set and a test set in Example 3 of the present invention;
[0058] Figure 4 A diagram showing a process of obtaining a processed data set in Example 4 of the present invention;
[0059] Figure 5 A process diagram of converting original customer history data into numerical data in Embodiment 5 of the present invention;
[0060] Figure 6 A process diagram of establishing a decision tree model in Example 6 of the present invention;
[0061] Figure 7 This is a process diagram of dividing credit samples in Embodiment 7 of the present invention;
[0062] Figure 8 This is a process diagram of performing multi-branch tree segmentation according to a specified method and a specified number of branches in Example 8 of the present invention;
[0063] Fig. 9 A process diagram of finding the actual value corresponding to the cumulative probability value for splitting branches in Embodiment 9 of the present invention;
[0064] Fig.10 This is a block diagram of a multi-bifurcation decision tree partitioning system based on a risk control scenario in Example 11 of the present invention. DETAILED DESCRIPTION
[0065] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0066] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0067] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as described in detail. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0068] Example 1: Figure 1 As shown, an embodiment of the present invention provides a multi-fork decision tree segmentation method based on a risk control scenario, comprising the following steps:
[0069] S100: Obtain historical customer data from credit institutions, process and sample the data according to business scenarios, and obtain the original data set;
[0070] S200: Based on the original data set, the numerical variables are kept unchanged, and the character and Boolean predictor variables are processed to obtain the processed data set;
[0071] S300: Based on the processed data set, the numerical variables, character type and Boolean type prediction variables are divided into multi-branch trees according to the specified method and the specified number of branches.
[0072] The working principle and beneficial effects of the above technical solution are as follows: the present embodiment first obtains historical customer data from a credit institution, processes and samples the data according to the business scenario, and obtains an original data set; secondly, based on the original data set, the numerical variables are kept unchanged, and the character and Boolean prediction variables are processed to obtain a processed data set; finally, based on the processed data set, the numerical variables, character and Boolean prediction variables are split into a multi-branch tree according to a specified method and a specified number of branches. Step S100 of the above solution obtains historical customer data from a credit institution, processes and samples the data according to the business scenario, obtains the original data set, obtains the historical customer data under the credit scenario, and performs necessary preprocessing and sampling to ensure the data quality and representativeness of subsequent modeling; it provides the necessary data basis for establishing a risk control model, and helps to evaluate and predict customer credit risk. Step S200 is based on the original data set, keeping the numerical variables unchanged, processing the character and Boolean predictor variables, obtaining the processed data set, preprocessing the data, ensuring the format consistency and availability of the data, and preparing for the subsequent model establishment; converting the data into a format that the model can process, eliminating the noise and inconsistency in the data, and improving the efficiency and accuracy of modeling. Step S300 is based on the processed data set, performing multi-branch tree segmentation on the numerical variables, character and Boolean predictor variables according to the specified method and the specified number of branches; using the decision tree model to segment and classify the data, constructing complex decision rules, thereby achieving accurate prediction of customer credit risk. Its significance lies in that through the multi-branch tree segmentation method, customer data can be subdivided into different categories, providing more refined and personalized guidance for credit decisions, effectively reducing credit risks and improving credit efficiency.
[0073] In summary, the steps of this embodiment together constitute a multi-branch decision tree segmentation method based on risk control scenarios. Through steps such as data acquisition, preprocessing and modeling, effective assessment and prediction of customer credit risk is achieved, providing credit institutions with a scientific and reliable risk management method.
[0074] Example 2: Figure 2 As shown, based on Example 1, the process of obtaining the original data set provided by the embodiment of the present invention includes the following steps:
[0075] S101: Adjust the data type of the prediction variable according to the business scenario; the prediction variable is of numeric, character or Boolean type; perform stratified sampling based on the proportion of each type of sample in the historical customer data, and each sample of the historical customer data has a weight;
[0076] S102: Divide the sampled data into a training set and a test set based on time series division; the training set is used for training and parameter estimation of the decision tree model, and the test set is used to verify the effect and performance of the decision tree model;
[0077] S103: Use the training set to train the decision tree model and estimate its parameters; perform weighted processing on the samples according to the weight variables.
[0078] The working principle and beneficial effects of the above technical solution are as follows: This embodiment first adjusts the data type of the prediction variable according to the business scenario; the prediction variable is a numeric type, a character type or a Boolean type; stratified sampling is performed according to the proportion of each type of sample in the historical customer data, and each sample of the historical customer data has a weight; secondly, the sampled data is divided into a training set and a test set based on time series partitioning; the training set is used for training and parameter estimation of the decision tree model, and the test set is used to verify the effect and performance of the decision tree model; finally, the training set is used for training and parameter estimation of the decision tree model; and the samples are weighted according to the weight variable. Data type adjustment of the above scheme: Adjusting the data type of the prediction variable to a numeric type, a character type or a Boolean type can ensure the accuracy and consistency of the data; variables of different data types may require different processing methods and algorithms in the subsequent modeling and analysis process, so the adjustment of the data type is to adapt to the subsequent data processing and analysis needs. Stratified sampling: Stratified sampling is performed based on the proportion of each type of sample in the historical customer data, which can keep the sample distribution in the training set and test set consistent with the distribution in the overall data set; ensure that the model can see sufficient information of each type of sample in both the training and testing stages, and avoid bias or overfitting of the model due to excessive bias towards a certain type of sample. Time series partitioning: Dividing the sampled data into training sets and test sets based on time series partitioning can simulate the data liquidity in real scenarios; in practical applications, the model needs to be able to predict and make decisions about future data, so dividing the data into training sets and test sets in chronological order can better evaluate the generalization ability of the model and its ability to predict unknown data. Decision tree model training and parameter estimation: Using the training set to train and estimate the parameters of the decision tree model, a decision tree model that can predict the target variable (good or bad label) can be established by learning the patterns and rules in the historical data; the decision tree model can provide highly interpretable decision rules, help understand the factors affecting customer credit behavior, and provide a basis for risk assessment and decision-making. Sample weighting processing: By weighting samples according to weight variables, the importance and representativeness of the samples can be considered. In risk control modeling, since the number of good samples far exceeds the number of bad samples, full data modeling consumes a lot of resources. Through sample weighting processing, limited resources can be used more effectively, the performance of the model can be evaluated more accurately, and the impact of bad samples can be paid more attention to in model training.
[0079] In summary, the various steps of this embodiment are intended to process data types, maintain the consistency of sample distribution, simulate real scenarios, establish an interpretable decision tree model, and more accurately evaluate the performance of the model. These technical effects and significance help to improve the accuracy, interpretability and adaptability of the model, thereby providing reliable support for credit risk assessment and decision-making. Through the above steps, the credit performance data set can be preprocessed, sampled, divided and modeled according to the actual business scenario for risk assessment and effect verification; it can help you better understand customer credit behavior and make more accurate predictions and decisions based on historical data. This embodiment adjusts the data format in combination with the business scenario and actual situation, standardizes the data format, and improves the efficiency of memory space utilization; reduces the sample size and improves the model calculation efficiency through sampling.
[0080] This embodiment obtains a credit performance data set of historical customers from a credit institution, and adjusts the variable data type according to the actual business scenario; performs stratified sampling on the data samples according to the proportion of each type of sample in the data; divides the sampled data into a training set and a test set based on a specified method, and performs training and effect verification respectively; wherein the data set includes a predictor variable, a target variable, and a weight variable; the predictor variable is the behavior information of the credit user, and its value type can be a numeric type, a character type, and a Boolean type; the target variable is obtained based on whether the credit customer is overdue, and is a binary classification variable, represented by good or bad, where good means that the user has no overdue behavior, and bad means that the user has overdue behavior; the weight variable is generated after sampling the overall data. In the business scenario of risk control modeling, if the institution has a long history of lending, a large amount of data will be accumulated and usually the number of good samples will far exceed the number of bad samples. Modeling with the full amount of data consumes more resources, so the overall data set will be sampled, and each sample after sampling will have a weight, and there will be a column of weights in the wide table of the sample data set.
[0081] Example 3: Figure 3 As shown, based on Example 2, the process of dividing the sampled data into a training set and a test set provided by the embodiment of the present invention includes the following steps:
[0082] S1021: Determine a time point for dividing a training set and a test set, divide the time series customer historical data according to the determined time point, use the data before the time point as the training set, and use the data after the time point as the test set;
[0083] S1022: Perform season-trend decomposition on the training set, decomposing the time series customer historical data into seasonal item components and trend item components; input the seasonal item components and trend item components in the training set into the reversible instance normalization layer respectively, and convert them into mean-centered distribution;
[0084] S1023: Input the seasonal term component and the trend term component of the mean center distribution into the Legendre projection unit respectively, dynamically update the time series representation vector, and obtain key historical information; input the obtained seasonal term component and the trend term component representation vector into the multi-layer perceptron neural network respectively, and complete the mapping from the representation vector of the historical input sequence to the representation vector of the future sequence;
[0085] S1024: inputting the representation vectors of the seasonal component and the trend component of the future sequence customer historical data into the reconstruction unit in the Legendre projection unit respectively, and reconstructing the representation vectors into the form of the original input by multiplying them by the discrete Legendre polynomial matrix;
[0086] S1025: Input the seasonal item component and trend item component of the reconstructed future sequence customer historical data into the reversible instance denormalization layer to restore them to their original distribution; combine the seasonal item component and trend item component of the obtained future sequence customer historical data to obtain the final output future sequence customer historical data; obtain the prediction results of the future sequence customer historical data in the training set and the test set based on time series division.
[0087] The working principle and beneficial effects of the above technical solution are as follows: This embodiment first determines the time point for dividing the training set and the test set, divides the time series customer historical data according to the determined time point, and uses the data before the time point as the training set and the data after the time point as the test set; secondly, the training set is subjected to seasonal-trend decomposition, and the time series customer historical data is decomposed into seasonal item components and trend item components; the seasonal item components and trend item components in the training set are respectively input into the reversible instance normalization layer and converted into mean-centered distribution; then the seasonal item components and trend item components of the mean-centered distribution are respectively input into the Legendre projection unit, the time series representation vector is dynamically updated, and key historical information is obtained; the representation vectors of the obtained seasonal item components and trend item components are respectively Input the multi-layer perceptron neural network to complete the mapping from the representation vector of the historical input sequence to the representation vector of the future sequence; input the representation vectors of the seasonal component and trend component of the future sequence customer historical data into the reconstruction unit in the Legendre projection unit respectively, and reconstruct the representation vector into the form of the original input by multiplying the discrete Legendre polynomial matrix; finally, input the seasonal component and trend component of the reconstructed future sequence customer historical data into the reversible instance denormalization layer to restore it to its original distribution; combine the seasonal component and trend component of the future sequence customer historical data to obtain the final output of the future sequence customer historical data; obtain the prediction results of the future sequence customer historical data in the training set and test set based on time series partitioning. The above scheme provides a complete process for the prediction task of time series data, and uses the technical means in each step to process data, extract features, model and predict. The specific meaning is as follows: Time series partitioning: By clarifying the time points of the training set and the test set, it can simulate the prediction task in the real scene and evaluate the performance and generalization ability of the model on unknown data. Season-trend decomposition: Decomposing time series data into seasonal terms and trend terms can better understand and capture seasonal changes and long-term trends in the data, providing a basis for subsequent modeling and prediction. Reversible instance normalization layer: By normalizing the seasonal terms and trend terms and converting them into mean-centered distributions, the stability and interpretability of the data can be improved. Legendre projection unit: By dynamically updating the time series representation vector, key historical information can be extracted and important patterns and trends in the time series can be captured. Multilayer perceptron neural network: By mapping the representation vector to the representation vector of the future sequence, a mapping relationship between the historical input sequence and the future sequence can be established to achieve the prediction of the future sequence. Denormalization layer and reconstruction unit: By denormalizing and reconstructing the representation vector of the prediction result, the prediction result can be restored to the original distribution and form, maintaining the integrity and consistency of the data.
[0088] Through the above scheme, this embodiment can comprehensively process and analyze time series data, so as to obtain the prediction results of future series customer historical data in the training set and test set based on time series division; it can provide accurate and reliable prediction and decision-making basis for financial risk control, sales forecasting, market trend analysis and other fields. Through the above process, the sampled data is divided into training set and test set based on time series division, and the seasonality and trend of the future series can be predicted by using methods such as season-trend decomposition, normalization processing, key historical information extraction, future series prediction, reconstruction inverse operation and anti-normalization processing, and the final output of future series data can be obtained; it can provide more accurate and reliable results for the prediction and analysis of time series data. Through the above process, the sampled data is divided into training set and test set based on time series division, which can simulate the time fluidity of data in real scenarios, ensure that the model can see historical data that is earlier than the test set in time during both the training and testing stages, and evaluate the prediction ability of the model on unknown data. It can better understand the generalization ability of the model and improve the accuracy and reliability of credit risk assessment and decision-making.
[0089] In the actual implementation, the Legendre projection unit extracts key historical information based on long-term dependencies and captures important patterns and trends in time series.
[0090] However, in some cases, Legendre projection may overfit the noise or outliers in the historical data, affecting the generalization ability of the model. This application also provides an optional implementation scheme to prevent the overfitting problem. The specific steps are as follows:
[0091] Obtain the representation vectors of the seasonal component and trend component of the future sequence customer historical data, use the customer historical data whose representation vector is greater than the set threshold as anti-overfitting data, and generate a cross-validation data set;
[0092] Construct a cross-validation analysis model based on anti-overfitting data;
[0093] Obtain the reconstruction calculation probability of customer historical data at each sequence node based on the cross-validation analysis model;
[0094] Classifying the sequence nodes corresponding to the future sequence customer historical data based on the reconstruction calculation probability to generate a first cross-validation data set and a second cross-validation data set;
[0095] Based on the collection time sequence of the sequence nodes, the corresponding first water customer historical data sequence and second customer historical data sequence are compiled and constructed for each sequence node in the first cross-validation data set and the second cross-validation data set;
[0096] Generate an initial customer history data packet based on each sequence node and its corresponding adjacency relationship in the first customer history data sequence and the second customer history data sequence;
[0097] Based on the collection timing of each sequence node in the initial customer historical data packet, the initial customer historical data packet is parsed in sequence to obtain the parsing result;
[0098] The order of the Legendre projection unit is adjusted according to the analytical results to optimize the model and generate a new representation vector.
[0099] What is the technical principle of the above solution? In the specific implementation process, seasonal items and trend items are extracted through time series decomposition to reduce the noise in the data. Thresholds are set to filter outliers, and only customer historical data with representation vectors greater than the set threshold are retained to reduce the impact of outliers. The filtered data is used to generate a cross-validation data set to ensure the quality and representativeness of the data set. A model is built based on anti-overfitting data, and cross-validation is performed to evaluate the performance of the model on different subsets. The reconstruction probability of each sequence node is calculated to evaluate the closeness of the data point to the model prediction. The sequence nodes are classified according to the reconstruction probability to generate two cross-validation data sets, which helps to identify the performance differences of the model on different categories. The data is arranged according to the collection time sequence, and the first and second customer historical data sequences are constructed to maintain the time series structure of the data. Data packets are generated using sequence nodes and their adjacency relationships to provide structured data for subsequent analysis. The initial data packet is parsed, and the order of the Legendre projection unit is adjusted according to the parsing results to optimize the model structure. The adjusted model generates a new representation vector, which is more likely to avoid overfitting because it is generated based on the consideration of the data time series structure and adjacency relationship.
[0100] Example 4: Figure 4 As shown, based on Example 1, the process of obtaining the processed data set provided in the embodiment of the present invention includes the following steps:
[0101] S201: Based on the data of the training set in the original customer historical data, the odds of each value corresponding to each prediction variable are calculated respectively;
[0102] Among them, odds is the ratio of the number of people who repay normally to the number of people who have overdue behavior in the customer data corresponding to each category. The higher the odds, the better the historical credit situation of this group of people.
[0103] S202: for each prediction variable, sort the original values from small to large according to the odds of the values, obtain the rank corresponding to each value, and establish a discrete attribute mapping table;
[0104] S203: The original customer historical data is converted into numerical values by mapping the original value data through ranking, and is used to establish a decision tree model.
[0105] The working principle and beneficial effects of the above technical solution are as follows: First, based on the data of the training set in the original customer historical data, this embodiment calculates the odds of each value corresponding to each prediction variable; odds is the ratio of the number of people who repay normally to the number of people with overdue behavior in the customer data corresponding to each category. The higher the odds, the better the historical credit situation of the group; secondly, for each prediction variable, the original values are sorted from small to large according to the odds of the value, and the rank corresponding to each value is obtained, and a discrete attribute mapping table is established; finally, the original value data is mapped by the rank, and the original customer historical data is converted into a numerical type for establishing a decision tree model. The above scheme converts the original customer historical data into numerical data so that it can be applied to establish a decision tree model for prediction and decision-making. The specific meaning is as follows: Odds calculation: By calculating the odds corresponding to different values of each prediction variable, the credit situation of customers with different values can be obtained from the historical data. The higher the odds, the better the historical credit situation of the customer corresponding to the value, and the lower the risk of default. Sorting and rank mapping: Sort the values of each predictor variable from small to large according to the odds, assign a rank to each value, and establish a discrete attribute mapping table, which can convert the original discrete attributes into numerical attributes, which is convenient for processing and analysis in the decision tree model. Numerical data modeling: By converting the original customer history data into numerical data, models such as decision trees can be applied for modeling and prediction; numerical data is easier to process and analyze, and can provide more accurate prediction and decision results.
[0106] Through the above scheme, this embodiment can convert the discrete attributes in the original customer historical data into numerical data, so as to establish a decision tree model for credit assessment and prediction; it can help financial institutions, credit companies, etc. to assess the default risk of customers and formulate corresponding risk management strategies. At the same time, this also provides more accurate input data for the decision tree model, improving the prediction ability and decision-making effect of the model. In this embodiment, the normal repayment group refers to the group that completes the repayment behavior within the repayment period; overdue repayment refers to the group that has not repaid the loan beyond the prescribed period; the rank is the order obtained by sorting the odds in ascending order in parallel, and the values of the same odds have the same rank; mapping the original value data with the rank means replacing the original attribute value with the rank to generate a new data set; the discrete attribute mapping table is the odds rank corresponding to the original attribute, and the attribute and rank are many-to-one (with parallel) or one-to-one (without parallel). Discrete attributes are originally unordered. Combining the historical credit information of each group adds order to the discrete attributes, making the variable monotonically increasing, simplifying the algorithm complexity when searching for split points and improving computing efficiency. In addition, the data actually used for training is converted from character or Boolean type to numerical type, reducing the difficulty of model processing.
[0107] Example 5: Figure 5 As shown, based on Example 4, the process of converting the original customer history data into a numerical value provided by the embodiment of the present invention includes the following steps:
[0108] S2031: Calculate odds for each prediction variable: For each prediction variable, calculate the odds corresponding to each value; Odds refers to the ratio of the number of people who repay normally to the number of people who have overdue behavior in the customer data corresponding to each category; By calculating odds, evaluate the historical credit status of customers with different values, the higher the odds, the better the credit status of the customer corresponding to the value;
[0109] S2032: For each prediction variable, sort the original values from small to large according to the odds of the values; and arrange the values according to their corresponding credit conditions;
[0110] S2033: According to the sorted values, a rank is assigned to each value, and a discrete attribute mapping table is established; the rank refers to the sequential position of the value after sorting, which is used to indicate the relative credit status of the value; according to the discrete attribute mapping table, the discrete attributes in the original customer history data are mapped to numerical types; by using the rank corresponding to each value, the discrete attributes are converted into numerical types.
[0111] The working principle and beneficial effects of the above technical solution are as follows: This embodiment first calculates odds for each prediction variable: for each prediction variable, calculate the odds corresponding to each value. Odds refers to the ratio of the number of people who repay normally to the number of people who have overdue behavior in the customer data corresponding to each category; by calculating odds, evaluate the historical credit status of customers with different values, and the higher the odds, the better the credit status of the customer corresponding to the value; secondly, for each prediction variable, sort the original values from small to large according to the odds of the value; arrange the values according to their corresponding credit status; finally, according to the sorted values, assign a rank to each value and establish a discrete attribute mapping table; rank refers to the order position of the value after sorting, which is used to represent the relative credit status of the value; according to the discrete attribute mapping table, the discrete attributes in the original customer historical data are mapped to numerical types; by using the rank corresponding to each value, the discrete attributes are converted to numerical types. The above scheme converts the discrete attributes in the original customer historical data into numerical data for the convenience of modeling and analysis. The specific meanings are as follows: Odds calculation: By calculating the odds corresponding to different values of each predictor variable, the credit status of customers with different values can be understood from historical data; the higher the odds, the better the historical credit status of the customer corresponding to the value, and the lower the risk of default. Sorting and rank mapping: Sort the odds of each predictor variable value from small to large, and assign a rank to each value to establish a discrete attribute mapping table; the original discrete attributes can be converted into numerical attributes, which is convenient for processing and analysis in the modeling process. Numerical data modeling: By converting the original customer historical data into numerical data, it can be applied to establish various models for analysis and prediction; numerical data is easier to process and analyze, and can provide more accurate prediction and decision results.
[0112] Through the above scheme, this embodiment can convert the discrete attributes in the original customer historical data into numerical types, so as to facilitate the establishment of models for credit assessment and prediction; it can help financial institutions, credit companies, etc. to assess the default risk of customers and formulate corresponding risk management strategies. At the same time, this also provides more accurate input data for the model, improving the model's predictive ability and decision-making effect. Through the above steps, the discrete attributes in the original customer historical data can be converted into numerical types, so as to facilitate the subsequent establishment and prediction of decision tree models; data can be better used for modeling and analysis, improving the accuracy and predictive ability of the model.
[0113] Example 6: Figure 6 As shown, based on Example 4, the process of establishing a decision tree model provided by the embodiment of the present invention includes the following steps:
[0114] S2034: Establish a first node by combining historical customer data, and use the first node as a root node; for each node, determine whether the original data set can be split;
[0115] Among them, splittable means: the data set of the current node is not empty and the sample size is greater than 1, and the target variables of the current node do not belong to the same category;
[0116] S2035: For the nodes that can be split, select the variable with the largest Gini gain to divide the credit population into two categories and generate the lower-level nodes;
[0117] S2036: For each newly generated node, continue to divide the lower-level nodes based on the variable with the largest Gini gain, and divide the credit samples until there are no more groups that can be divided in the decision tree.
[0118] The working principle and beneficial effects of the above technical solution are as follows: This embodiment first establishes the first node by combining historical customer data, and the first node is used as the root node; for each node, it is determined whether the data set can be split; wherein, splittable means: the data set of the current node is not empty and the sample size is greater than 1, and the current node target variable does not belong to the same category; secondly, for the splittable nodes, the variable with the largest Gini gain is selected to divide the credit population into two categories, and the lower-level nodes are generated; finally, for each newly generated node, the lower-level nodes are obtained by continuously splitting based on the variable with the largest Gini gain, and the credit samples are divided until there are no groups that can be further divided in the decision tree. The above scheme establishes a decision tree model: by combining the first data and the second data, and the division rule based on the Gini gain, a decision tree model is established; the decision tree model is an intuitive and easy-to-interpret classification model, which can quickly and accurately classify the credit population by dividing the characteristics of the samples, thereby helping decision makers make corresponding decisions. Data segmentation and sample classification: According to the judgment conditions of the splittable nodes, the samples in the original data set are divided and classified; by selecting the variable with the largest Gini gain for segmentation, the purity of the child nodes after segmentation can be maximized, that is, as many samples belonging to the same category as possible in the child nodes, thereby enhancing the classification ability of the model. Select important features: The segmentation rule based on the Gini gain can help select important feature variables; the Gini gain measures the degree of uncertainty reduction of the target variable before and after the segmentation. The larger the gain, the greater the contribution of the feature variable to the classification; by continuously segmenting based on the variable with the largest Gini gain, the feature variables that play a key role in the classification can be gradually screened out, thereby improving the explanatory power and prediction accuracy of the model. Simplify the model structure: In the process of establishing the decision tree model, by segmenting the nodes and selecting the variables for segmentation, a decision tree with a hierarchical structure is finally obtained; this hierarchical structure can help understand and explain the decision-making process of the model, and at the same time simplifies the structure of the model and reduces the complexity of the model. Interpretability and interpretability: The decision tree model has good interpretability and interpretability. By analyzing the decision tree, we can intuitively understand the importance and influence of different feature variables, as well as the contribution of different partition nodes to the classification results; it helps decision makers understand the decision logic of the model and make corresponding decisions based on the output of the model.
[0119] In this embodiment, the stopping condition for building the decision tree model is:
[0120] The data set of the current node is empty, that is, there are no samples to be divided;
[0121] The number of samples of the current node is less than or equal to 1, which means that the division cannot be continued;
[0122] The target variable of the current node belongs to the same category, that is, purity has been achieved;
[0123] After building the decision tree model, pruning is required to improve the generalization ability of the model. Before dividing the node, a judgment is made. If the performance improvement after the division is not obvious, or the preset stop condition is reached, the division is stopped and the current node is marked as a leaf node.
[0124] In summary, this embodiment achieves rapid classification and decision support for credit population by establishing a decision tree model and selecting partitioning variables based on Gini gain; it helps to improve the accuracy and efficiency of decision-making, and helps decision makers understand the decision logic of the model, so as to make more informed decisions. Gini gain represents the ability to further distinguish good credit samples from bad credit samples by using this variable partitioning. The larger the Gini gain, the stronger the variable's ability to distinguish. There is no group that can be further divided, which means that the data labels inside the current node are unified or the variable value inside the branch is unique or there is only one sample in the branch. It realizes the use of processed data to segment the decision tree based on Gini gain, effectively distinguishing people with different credit performance and dividing them into different groups.
[0125] Example 7: Figure 7 As shown, based on Example 6, the process of dividing the credit samples provided in this embodiment of the present invention specifically includes the following steps:
[0126] S20361: Based on the current node data, traverse all feasible split points of each variable, and select the split point with the largest Gini gain as the optimal split of the variable;
[0127] S20362: traverse all variables of the current node. If there is a feasible split point, based on the optimal split of each variable, select the variable with the largest Gini gain to divide the population, generate lower-level nodes, and obtain two different populations;
[0128] In this embodiment, the original segmentation condition is obtained by combining the attribute mapping table and the binning table with the current segmentation condition.
[0129] The working principle and beneficial effects of the above technical solution are as follows: first, based on the current node data, this embodiment traverses all feasible split points of each variable, and selects the split point with the largest Gini gain as the optimal split of the variable; secondly, traverses all variables of the current node, and if there is a feasible split point, based on the optimal split of each variable, selects the variable with the largest Gini gain to divide the population, generates lower-level nodes, and obtains two different populations. The above solution selects the optimal split point: by traversing all feasible split points of each variable and calculating the Gini gain, selects the split point with the largest Gini gain as the optimal split point of the variable; such selection of the optimal split point can maximize the purity of the child nodes after division, that is, obtain as many samples as possible belonging to the same category in the child nodes, thereby enhancing the classification ability of the model. Variable selection: for each variable of the current node, by calculating the Gini gain of the optimal split point of each variable, select the variable with the largest Gini gain for division; such selection of variable division based on the Gini gain can gradually screen out the characteristic variables that play a key role in classification, thereby improving the explanatory power and prediction accuracy of the model. Population division and node generation: Based on the selection of the optimal split point and the optimal variable, the population of the current node is divided into two different populations, and the lower-level nodes are generated; by continuously dividing the population and generating nodes, a hierarchical decision tree model can be constructed for classification and decision support of the credit population. Improve the accuracy of the model: By selecting the optimal split point and the optimal variable for division, the accuracy of the model can be maximized; the division rule based on the Gini gain can help select important feature variables and split points, improve the model's ability to classify samples, and thus make the model's classification results more accurate and reliable. Simplify the model structure: In the process of establishing the decision tree model, the division is carried out through the selection of split points and variables, and finally a decision tree with a hierarchical structure is obtained; this hierarchical structure can help understand and explain the decision-making process of the model, and also simplifies the structure of the model and reduces the complexity of the model.
[0130] Example 8: Figure 8 As shown, based on Example 1, the process of performing multi-branch tree segmentation according to a specified method and a specified number of branches provided in an embodiment of the present invention includes the following steps:
[0131] S301: Selecting a splitting method and a number of branches of the multi-branch tree based on actual needs; the splitting methods include: equal frequency splitting, equal distance splitting and Gini splitting;
[0132] Among them, equal frequency segmentation specifically includes:
[0133] Based on the sample weights and sample values of the variables, a cumulative distribution function is established;
[0134] According to the number of branches, determine the cumulative probability value of the variable corresponding to each branch;
[0135] Based on the cumulative distribution function, find the actual value corresponding to the cumulative probability value used to split the branch. This value is the split point, which is used to divide the credit population into groups with different risk levels and distinguish good and bad credit samples as much as possible;
[0136] Equidistant segmentation specifically includes:
[0137] According to the variable value range [A, B] and the number of branches N, the range is divided into N equal parts, each part corresponds to an interval, and the length of each interval is (BA) / N;
[0138] The assumption implied by equal-interval segmentation is that the risk level of the credit population is relatively uniform with respect to the value distribution of the variable, and the credit risk levels represented by the segmented population are different;
[0139] S302: Splitting the variable based on a specified method and a specified number of branches;
[0140] S303: For discrete and Boolean attributes, find the original value corresponding to the split point based on the obtained discrete attribute mapping table, and determine the discrete value contained in each branch.
[0141] The working principle and beneficial effects of the above technical solution are as follows: This embodiment first selects the segmentation method and number of branches of the multi-branch tree based on actual needs; the segmentation methods include: equal frequency segmentation, equal distance segmentation and Gini segmentation; secondly, the variables are segmented based on the specified method and the specified number of branches; finally, for discrete and Boolean attributes, the original value corresponding to the segmentation point is found based on the obtained discrete attribute mapping table, and the discrete value contained in each branch is determined. Step S301 of the above solution selects the segmentation method and number of branches of the multi-branch tree based on actual needs, including equal frequency segmentation, equal distance segmentation and Gini segmentation; selects the appropriate segmentation method and number of branches according to actual needs to maximize the discriminative ability and predictive ability of the variable; flexibly selects the segmentation method and number of branches according to the specific scenario requirements to help build a more accurate and effective decision tree model. Step S302 divides the variables based on the specified method and the specified number of branches. According to the selected division method and the number of branches, the variables are divided into multiple subsets; by dividing the variables, the data set is subdivided into different subsets, so that the data within each subset is more similar, and the discrimination ability and prediction accuracy of the decision tree model are improved. Step S303 finds the original value corresponding to the division point for discrete and Boolean attributes based on the obtained discrete attribute mapping table, and determines the discrete value contained in each branch; maps the discrete attribute corresponding to the division point back to the original value through the mapping table, so as to determine the discrete value contained in each branch; restores the original value of the discrete attribute, maintains the interpretability and comprehensibility of the data, and provides more accurate and intuitive results for subsequent decision analysis.
[0142] In summary, these steps of this embodiment together constitute a process of splitting a multi-branch tree in a specified manner and with a specified number of branches. By selecting an appropriate splitting method and number of branches, the variables are split and the original values of the discrete attributes are restored, thereby improving the accuracy, interpretability and comprehensibility of the decision tree model; it helps to better understand the decision-making process of the model and provide a scientific basis for risk control decisions.
[0143] Example 9: Fig. 9 As shown, based on Example 8, the process of finding the actual value corresponding to the cumulative probability value for splitting the branch provided in the embodiment of the present invention includes the following steps:
[0144] S3011: according to the inverse function of the cumulative probability function, find the actual value corresponding to the cumulative probability value used to split the branch, and construct a binning table; the binning table contains each cumulative probability value interval and the corresponding actual value;
[0145] S3012: For each sample in the original customer historical data, according to the value of its prediction variable, search the binning table to determine its corresponding cumulative probability value interval;
[0146] S3013: Replace the original values of the prediction variables in the original customer history data with the corresponding cumulative probability value intervals; wherein each prediction variable is mapped to the cumulative probability value interval to which it belongs.
[0147] The working principle and beneficial effects of the above technical solution are as follows: the present embodiment first finds the actual value corresponding to the cumulative probability value for branching according to the inverse function of the cumulative probability function, and constructs a binning table; the binning table contains each cumulative probability value interval and the corresponding actual value; secondly, for each sample in the original customer historical data, according to the value of its prediction variable, the binning table is searched to determine its corresponding cumulative probability value interval; finally, the original value of the prediction variable in the original customer historical data is replaced with the corresponding cumulative probability value interval; wherein each prediction variable is mapped to its corresponding cumulative probability value interval. Step S3011 of the above solution finds the actual value corresponding to the cumulative probability value for branching according to the inverse function of the cumulative probability function, and constructs a binning table; the binning table contains each cumulative probability value interval and the corresponding actual value; through the inverse function of the cumulative probability function, the cumulative probability value is mapped back to the actual value, thereby determining the actual value for branching, and constructing the binning table, realizing the binning processing of the original data, providing a basis for the subsequent model establishment, and making the model more interpretable and understandable. Step S3012 For each sample in the original customer historical data, according to the value of its prediction variable, look up the binning table and determine its corresponding cumulative probability value interval; map the prediction variable in the original data to the corresponding cumulative probability value interval, realize the conversion and mapping of the prediction variable, determine the cumulative probability value interval for each sample, and provide preparation for subsequent model training and prediction. Step S3013 Replace the original value of the prediction variable in the original customer historical data with the corresponding cumulative probability value interval; each prediction variable is mapped to its own cumulative probability value interval; replace the prediction variable in the original data with the corresponding cumulative probability value interval, realize the conversion and mapping of the data; convert the data into a format acceptable to the model, and provide a data basis for subsequent model training and prediction.
[0148] In summary, through the implementation of these steps, this embodiment can effectively pre-process and transform the original data, providing preparation for subsequent model building and prediction. At the same time, binning also helps to improve the robustness and stability of the model, reduce the impact of outliers and noise on the model, and make the model more reliable and credible.
[0149] Example 10: Based on Example 8, the Gini split provided in the embodiment of the present invention obtains multiple bifurcations by continuously performing binary bifurcation on variables, and the specific steps include:
[0150] (1) The original data set is taken as a branch, and the Gini gain of each split is calculated based on all feasible split points of the variables on the branch;
[0151] (2) Select the point with the largest Gini gain as the split point, and obtain two new branches. The two new branches represent two groups of people with different risk levels.
[0152] (3) For each newly generated branch, if the target variable value is not unique, the predictor variable value is not unique, and the original sample size of the branch is greater than 1, calculate the maximum Gini gain that can be obtained by branch splitting;
[0153] (4) For each branch that has not been split, compare the potential Gini gains of its split, select the one with the largest potential Gini gain for splitting, and obtain two new branches;
[0154] (5) Repeat the above process (3) and (4) until there are no more branches that can be split or the specified number of branches has been reached;
[0155] (6) All leaf nodes are taken as branch results, which represent the population categories with different risk levels that are finally distinguished;
[0156] Among them, the calculation method of Gini gain is as follows:
[0157] The Gini Gain obtained by dividing sample D according to feature A is:
[0158] Gini_Gain A (D) = Gini(D) - Gini(D|A = a)
[0159] Gini(D) is the Gini coefficient of data set D, formula:
[0160]
[0161] Gini(D|A=a) is the Gini coefficient after division, formula:
[0162]
[0163] Where n is the number of categories in the dataset D, p(y i ) is the category y in the dataset D iThe proportion of samples with "good" target variable in dataset D; a represents a certain value of feature variable A, which is used to divide dataset D into two subsets; Gini(D|A=a): Gini coefficient of the divided subsets under the condition that the value of feature variable A is a; where |D1| and |D2| represent the number of samples in the two divided subsets, respectively, and Gini(D1) and Gini(D2) represent the Gini coefficient of the two divided subsets; good_rate represents the proportion of samples with "good" target variable in dataset D; bad_rate: The proportion of samples with "bad" target variable in dataset D; Gini(D|A=a) is the Gini coefficient of the divided subsets under the condition that the value of feature A is a. Gini_Gain A The larger the (D) is, the greater the role of feature A in sample classification.
[0164] In this business scenario, the Gini coefficient of the data set is 1 minus the square of the rate of samples with good credit performance and the square of the rate of samples with bad credit performance, which is used to measure the uniformity of the sample performance of the data set. The Gini gain indicates the ability to further distinguish good credit samples from bad credit samples by using this variable division.
[0165] The working principle and beneficial effects of the above technical solution are as follows: in this embodiment, the original entire data set is taken as a branch, and based on all feasible splitting points of the variables on the branch, the Gini gain of each split is calculated; the one with the largest Gini gain is selected as the splitting point, and two new branches are obtained by splitting, and the two new branches represent two types of people with different risk levels; for each newly generated branch, if the value of its target variable is not unique, and the value of the predictor variable is not unique, and the original sample size of the branch is greater than 1, the maximum Gini gain that can be obtained by splitting with the branch is calculated; for each branch that has not been split, the potential Gini gain of its split is compared, and the one with the largest potential Gini gain is selected for splitting to obtain two new branches; the above processes (3) and (4) are repeated until there are no branches that can be split or the specified number of branches has been reached; all leaf nodes are taken as branch results, which represent the population categories with different risk levels that are finally distinguished. The above scheme takes the original entire data set as a branch, and calculates the Gini gain of each split based on all feasible split points of the variables on the branch; evaluates the quality of each split by calculating the Gini gain to determine the best split point; finds the split point that can most effectively distinguish the risk level, so as to subsequently split people of different risk levels. Select the split point with the largest Gini gain to split the data set into two new branches, representing two groups of people with different risk levels; divide the data set into two subsets according to the split point with the largest Gini gain, so as to achieve the purpose of preliminary differentiation of the population; through the selection of the split point, the data set is divided into two subsets with significantly different risk levels. For each newly generated branch, if the target variable value is not unique, the predictor variable value is not unique, and the original sample size of the branch is greater than 1, calculate the maximum Gini gain that can be obtained by splitting with the branch; calculate the maximum Gini gain of the branch to determine whether to continue splitting the branch; evaluate the effect of further splitting by calculating the maximum Gini gain to avoid invalid splitting operations. For each branch that has not been split, compare the potential Gini gain of the split, select the one with the largest potential Gini gain for splitting, and obtain two new branches; select the branch with the largest potential Gini gain for splitting to obtain better branching effect; by selecting the branch with the largest potential Gini gain for splitting, the splitting effect and prediction accuracy of the model are improved. Repeat the above process (3) and (4) until there are no branches that can be split or the specified number of branches has been reached; by repeating the splitting process, the branches are gradually refined until the stop condition is met; by repeated splitting, the data set is divided into multiple subdivided risk level categories, which improves the accuracy and detail of the model. Take all leaf nodes as the final branch results, representing the population categories of different risk levels that are finally distinguished; take the leaf nodes after splitting as the final branch results, representing different risk level populations; classify the population according to the splitting results to provide a basis for subsequent risk assessment and decision-making.
[0166] In summary, through the implementation of these steps, the Gini split can effectively divide the data set into different risk level groups in this embodiment, and achieve risk assessment and differentiation. This helps to improve the accuracy and interpretability of the model, and provide decision-making basis and guidance for risk management and decision-making.
[0167] Example 11: Fig.10 As shown, based on Embodiment 1 to Embodiment 10, the multi-bifurcation decision tree segmentation system based on the risk control scenario provided by the embodiment of the present invention includes:
[0168] The data acquisition module is responsible for obtaining historical customer data from credit institutions, processing and sampling the data according to business scenarios, and obtaining the original data set;
[0169] The data processing module is responsible for processing character and Boolean predictor variables based on the original data set, keeping the numerical variables unchanged, and obtaining the processed data set;
[0170] The splitting execution module is responsible for performing multi-branch tree splitting on numerical variables, character and Boolean prediction variables in a specified manner and with a specified number of branches based on the processed data set.
[0171] The working principle and beneficial effects of the above technical solution are as follows: the data acquisition module of this embodiment obtains historical customer data from a credit institution, processes and samples the data according to the business scenario, and obtains an original data set; the data processing module keeps the numerical variables unchanged based on the original data set, processes the character and Boolean prediction variables, and obtains a processed data set; the segmentation execution module performs multi-branch tree segmentation on the numerical variables, character and Boolean prediction variables according to the specified method and the specified number of branches based on the processed data set. The data acquisition module of the above scheme obtains the historical customer data of the credit institution, and pre-processes and samples the data to meet the needs of subsequent model establishment and segmentation; obtains a reliable data source to provide data support for subsequent risk control decisions. The data processing module processes the original data set, including encoding or converting the character and Boolean prediction variables to meet the requirements of multi-branch decision tree segmentation; converts the data into numerical variables that can be used for segmentation, and provides necessary data preparation for the subsequent segmentation process. The segmentation execution module segments the data according to the specified segmentation method and number of branches to generate a multi-branch decision tree; through the multi-branch decision tree segmentation system, customer data is segmented and classified to achieve risk level assessment and risk control decision-making.
[0172] In summary, through the implementation of these modules, the multi-fork decision tree segmentation system based on the risk control scenario in this embodiment can obtain historical customer data from credit institutions, process and prepare the data, and then segment it based on the specified segmentation method and number of branches to generate a multi-fork decision tree. This helps to segment and classify customers, realize the assessment of risk levels and the formulation of risk control decisions. Its significance lies in improving the accuracy and efficiency of risk control decisions, reducing risk losses, and protecting the interests of credit institutions.
[0173] Embodiment 12: Based on Embodiment 11, the data acquisition module provided in the embodiment of the present invention includes:
[0174] The stratified sampling submodule is responsible for adjusting the data type of the prediction variable according to the business scenario; the prediction variable is numeric, character or Boolean; stratified sampling is performed based on the proportion of each type of sample in the historical customer data, and each sample of the historical customer data has a weight;
[0175] The data set partitioning submodule is responsible for partitioning the sampled data into training sets and test sets based on time series partitioning; the training set is used for training and parameter estimation of the decision tree model, and the test set is used to verify the effect and performance of the decision tree model;
[0176] The weighted processing submodule is responsible for using the training set to train the decision tree model and estimate its parameters; it performs weighted processing on the samples according to the weight variables.
[0177] The working principle and beneficial effects of the above technical solution are as follows: the stratified sampling submodule of this embodiment adjusts the data type of the prediction variable according to the business scenario; the prediction variable is a numeric type, a character type or a Boolean type; stratified sampling is performed according to the proportion of each type of sample in the historical customer data, and each sample of the historical customer data has a weight; the data set partitioning submodule divides the sampled data into a training set and a test set based on time series partitioning; the training set is used for training and parameter estimation of the decision tree model, and the test set is used to verify the effect and performance of the decision tree model; the weighted processing submodule uses the training set to train and estimate the parameters of the decision tree model; and the samples are weighted according to the weight variable. Data type adjustment of the above scheme: adjusting the data type of the prediction variable to a numeric type, a character type or a Boolean type can ensure the accuracy and consistency of the data; variables of different data types may require different processing methods and algorithms in the subsequent modeling and analysis process, so the adjustment of the data type is to adapt to the subsequent data processing and analysis needs. Stratified sampling: Stratified sampling is performed based on the proportion of each type of sample in the historical customer data, which can keep the sample distribution in the training set and test set consistent with the distribution in the overall data set; ensure that the model can see sufficient information of each type of sample in both the training and testing stages, and avoid bias or overfitting of the model due to excessive bias towards a certain type of sample. Time series partitioning: Dividing the sampled data into training sets and test sets based on time series partitioning can simulate the data liquidity in real scenarios; in practical applications, the model needs to be able to predict and make decisions about future data, so dividing the data into training sets and test sets in chronological order can better evaluate the generalization ability of the model and its ability to predict unknown data. Decision tree model training and parameter estimation: Using the training set to train and estimate the parameters of the decision tree model, a decision tree model that can predict the target variable (good or bad label) can be established by learning the patterns and rules in the historical data; the decision tree model can provide highly interpretable decision rules, help understand the factors affecting customer credit behavior, and provide a basis for risk assessment and decision-making. Sample weighting processing: By weighting samples according to weight variables, the importance and representativeness of the samples can be considered. In risk control modeling, since the number of good samples far exceeds the number of bad samples, full data modeling consumes a lot of resources. Through sample weighting processing, limited resources can be used more effectively, the performance of the model can be evaluated more accurately, and the impact of bad samples can be paid more attention to in model training.
[0178] In summary, the various steps of this embodiment are intended to process data types, maintain the consistency of sample distribution, simulate real scenarios, establish interpretable decision tree models, and more accurately evaluate the performance of the model. These technical effects and significance help improve the accuracy, interpretability and adaptability of the model, thereby providing reliable support for credit risk assessment and decision-making. Through the above steps, the credit performance data set can be preprocessed, sampled, divided and modeled according to actual business scenarios for risk assessment and effect verification; it can help you better understand customer credit behavior and make more accurate predictions and decisions based on historical data.
[0179] This embodiment obtains a credit performance data set of historical customers from a credit institution, and adjusts the variable data type according to the actual business scenario; performs stratified sampling on the data samples according to the proportion of each type of sample in the data; divides the sampled data into a training set and a test set based on a specified method, and performs training and effect verification respectively; wherein the data set includes a predictor variable, a target variable, and a weight variable; the predictor variable is the behavior information of the credit user, and its value type can be a numeric type, a character type, and a Boolean type; the target variable is obtained based on whether the credit customer is overdue, and is a binary classification variable, represented by good or bad, where good means that the user has no overdue behavior, and bad means that the user has overdue behavior; the weight variable is generated after sampling the overall data. In the business scenario of risk control modeling, if the institution has a long history of lending, a large amount of data will be accumulated and usually the number of good samples will far exceed the number of bad samples. Modeling with the full amount of data consumes more resources, so the overall data set will be sampled, and each sample after sampling will have a weight, and there will be a column of weights in the wide table of the sample data set.
[0180] Embodiment 13: Based on Embodiment 11, the data acquisition module provided by the embodiment of the present invention includes:
[0181] The ratio calculation submodule is responsible for calculating the odds of each value corresponding to each prediction variable based on the data of the training set in the original customer historical data;
[0182] Among them, odds is the ratio of the number of people who repay normally to the number of people who have overdue behavior in the customer data corresponding to each category. The higher the odds, the better the historical credit situation of this group of people.
[0183] The mapping table establishment submodule is responsible for sorting the original values of each prediction variable according to the odds of the values from small to large, obtaining the rank corresponding to each value, and establishing a discrete attribute mapping table;
[0184] The model building submodule is responsible for mapping the original value data through ranks, converting the original customer historical data into numerical data for building a decision tree model;
[0185] The probability interval determination submodule is responsible for establishing the cumulative distribution function of the variable based on the training set data in the original customer historical data, based on the sample weights and sample values of the predictor variables in the training set data; and determining the cumulative probability interval corresponding to each bin according to the number of bins;
[0186] The interval number corresponding submodule is responsible for finding the actual value corresponding to the endpoint of the cumulative probability interval based on the cumulative distribution function, and using the value as the binning interval; constructing a binning table based on all binning intervals. The binning table contains the correspondence between each value interval and the interval number, which is equivalent to dividing the credit population into different groups according to the probability of the sample value occurring, and examining the characteristics of the variable in groups;
[0187] The data mapping submodule is responsible for mapping the original customer historical data based on the binning table, mapping the data to the serial number of the bin to which it belongs, and obtaining the discretized data.
[0188] The working principle and beneficial effects of the above technical solution are as follows: the ratio calculation submodule of this embodiment calculates the odds of each value corresponding to each prediction variable based on the data of the training set in the original customer historical data; wherein odds is the ratio of the number of people who repay normally to the number of people who have overdue behavior in the customer data corresponding to each category, and the higher the odds, the better the historical credit status of the group; the mapping table establishment submodule sorts the original values of each prediction variable from small to large according to the odds of the value, obtains the rank corresponding to each value, and establishes a discrete attribute mapping table; the model establishment submodule maps the original value data through the rank, and the original customer historical data is converted into a numerical type for establishing a decision tree model; the probability interval determination submodule Based on the training set data in the original customer historical data, based on the sample weights and sample values of the predictor variables in the training set data, the cumulative distribution function of the variable is established; according to the number of bins, the cumulative probability interval corresponding to each bin is determined; the interval number corresponding submodule finds the actual value corresponding to the endpoint of the cumulative probability interval based on the cumulative distribution function, and uses the value as the bin interval; based on all bin intervals, a bin table is constructed, and the bin table contains the correspondence between each value interval and the interval number, which is equivalent to dividing the credit population into different groups according to the probability of the sample value, and examining the characteristics of the variables in groups; the data mapping submodule maps the original customer historical data based on the bin table, maps the data to the serial number of the bin to which it belongs, and obtains the discretized data. The above scheme converts the original customer historical data into numerical data so that it can be applied to the establishment of a decision tree model for prediction and decision-making. The specific meaning is as follows: Odds calculation: By calculating the odds corresponding to different values of each predictor variable, the credit situation of customers with different values can be obtained from the historical data. The higher the odds, the better the historical credit situation of the customer corresponding to the value, and the lower the risk of default. Sorting and rank mapping: Sort the values of each predictor variable from small to large according to the odds, assign a rank to each value, and establish a discrete attribute mapping table, which can convert the original discrete attributes into numerical attributes, which is convenient for processing and analysis in the decision tree model. Numerical data modeling: By converting the original customer history data into numerical data, models such as decision trees can be applied for modeling and prediction; numerical data is easier to process and analyze, and can provide more accurate prediction and decision results.
[0189] Through the above scheme, this embodiment can convert the discrete attributes in the original customer historical data into numerical data, so as to establish a decision tree model for credit assessment and prediction; it can help financial institutions, credit companies, etc. to assess the default risk of customers and formulate corresponding risk management strategies. At the same time, this also provides more accurate input data for the decision tree model, improving the model's prediction ability and decision-making effect.
[0190] The above scheme discretizes the original customer history data and converts the continuous prediction variables into discrete bin numbers. The specific meanings are as follows: Establishing the cumulative distribution function: By establishing the cumulative distribution function of the variable based on the training set data, the distribution of the prediction variable in the training set can be understood; the cumulative distribution function can reflect the cumulative probability of the variable value, which helps to understand the distribution characteristics of the variable. Determine the bin interval: According to the number of bins, determine the cumulative probability interval corresponding to each bin; the value range of the variable can be divided into multiple discrete bin intervals, which is convenient for grouping and analyzing the data. Constructing the bin table: Based on the cumulative distribution function, find the actual value corresponding to the endpoint of the cumulative probability interval, and use the value as the bin interval; by constructing the bin table, each value interval and the interval number can be matched, and the customer history data can be divided into different groups, which is helpful to evaluate the variable characteristics of different groups. Data mapping: Map the original customer history data based on the bin table, and map the data to the bin number to which it belongs; through the discretization processing after mapping, the original continuous data can be converted into discrete bin numbers, which is convenient for subsequent modeling and analysis.
[0191] Through the above scheme, this embodiment can discretize the original customer historical data and convert the continuous prediction variables into discrete bin numbers; it can help analysts better understand the distribution characteristics of the data and the influence of the variables, so as to make more accurate decisions and predictions in the fields of credit assessment and risk management. At the same time, the discretized data is also easier to process and analyze, which helps to improve the efficiency and accuracy of modeling.
[0192] Embodiment 14: Based on Embodiment 11, the segmentation execution module provided in the embodiment of the present invention includes:
[0193] The method confirmation submodule is responsible for selecting the splitting method and number of branches of the multi-branch tree based on actual needs; the splitting methods include: equal frequency splitting, equal distance splitting and Gini splitting;
[0194] Among them, equal frequency segmentation specifically includes:
[0195] Based on the sample weights and sample values of the variables, a cumulative distribution function is established;
[0196] According to the number of branches, determine the cumulative probability value of the variable corresponding to each branch;
[0197] Based on the cumulative distribution function, find the actual value corresponding to the cumulative probability value used to split the branch. This value is the split point, which is used to divide the credit population into groups with different risk levels and distinguish good and bad credit samples as much as possible;
[0198] Equidistant segmentation specifically includes:
[0199] According to the variable value range [A, B] and the number of branches N, the range is divided into N equal parts, each part corresponds to an interval, and the length of each interval is (BA) / N;
[0200] The assumption implied by equal-interval segmentation is that the risk level of the credit population is relatively uniform with respect to the value distribution of the variable, and the credit risk levels represented by the segmented population are different;
[0201] The segmentation confirmation submodule is responsible for segmenting the variables based on the specified method and the specified number of branches;
[0202] The discrete value determination submodule is responsible for finding the original value corresponding to the split point based on the discrete attribute mapping table obtained for discrete and Boolean attributes, and determining the discrete value contained in each branch.
[0203] The working principle and beneficial effects of the above technical solution are as follows: the method confirmation submodule of this embodiment selects the segmentation method and the number of branches of the multi-branch tree based on actual needs; the segmentation methods include: equal frequency segmentation, equal distance segmentation and Gini segmentation; among them, equal frequency segmentation specifically includes: establishing a cumulative distribution function based on the sample weight and sample value of the variable; determining the cumulative probability value of the variable corresponding to each branch according to the number of branches; based on the cumulative distribution function, finding the actual value corresponding to the cumulative probability value used to segment the branch, and the value is the segmentation point, which is used to divide the credit population into people with different risk levels and distinguish good and bad credit samples as much as possible. ; Equal-interval segmentation specifically includes: according to the variable value range interval [A, B] and the number of branches N, the range interval is evenly divided into N equal parts, each part corresponds to an interval, and the length of each interval is (BA) / N; the assumption implied by equal-interval segmentation is: the risk level of the credit population is relatively evenly distributed with respect to the value of the variable, and the credit risk level represented by the segmented population is different; the segmentation confirmation submodule segments the variable based on the specified method and the specified number of branches; the discrete value determination submodule finds the original value corresponding to the segmentation point for discrete and Boolean attributes based on the obtained discrete attribute mapping table, and determines the discrete value contained in each branch. The above scheme confirmation submodule determines the appropriate segmentation method and number of branches according to the needs, so as to effectively segment the data; selects the most suitable segmentation method and number of branches according to specific needs to ensure that the segmentation results can meet the requirements of the risk control scenario; based on the equal frequency segmentation method, by establishing the cumulative distribution function and determining the segmentation point, the equal frequency segmentation of the variable is realized to ensure that the risk level of the segmented population is differentiated; equal frequency segmentation of the credit population can better characterize the characteristics of the population at different risk levels, so as to formulate risk control strategies in a targeted manner; based on the equal interval segmentation method, by dividing the value range of the variable into multiple intervals, the equal interval segmentation of the variable is realized; assuming that the risk level of the credit population is relatively uniform with respect to the value distribution of the variable, the equal interval segmentation can divide the population into different risk levels as much as possible, which is convenient for the formulation of risk control decisions. The segmentation confirmation submodule segments the variable according to the specified segmentation method and number of branches to obtain the segmentation result of the multi-branch tree; the variable is segmented according to the specified method and number of branches, which provides a specific segmentation basis for risk control decisions. The discrete value determination submodule maps the split points back to the original values according to the discrete attribute mapping table, and determines the discrete values contained in each branch. When splitting discrete and Boolean attributes, it can accurately determine the specific discrete values contained in each branch, providing accurate split results for subsequent risk control decisions.
[0204] In summary, through the implementation of these sub-modules, the multi-fork decision tree segmentation system based on the risk control scenario in this embodiment can select the appropriate segmentation method and number of branches according to the needs, and segment the variables to obtain the multi-fork decision tree segmentation results; it is helpful to divide the credit population into people with different risk levels according to the value characteristics of different variables, and provide a specific segmentation basis for risk control decisions; improve the accuracy of risk classification and the efficiency of risk control decisions, and help credit institutions better manage risks.
[0205] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention belong to the scope of the present invention and its equivalent technologies, the present invention is also intended to include these changes and variations.
Claims
1. A multi-fork decision tree segmentation method based on risk control scenarios, characterized in that: The following steps are involved: Obtain historical customer data from credit institutions, process and sample the data according to business scenarios, and obtain the original data set; Based on the original data set, keep the numerical variables unchanged, process the character and Boolean predictor variables, and obtain the processed data set; Based on the processed data set, the numerical variables, character and Boolean predictor variables are split into multi-branch trees according to the specified method and the specified number of branches.
2. The multi-bifurcation decision tree segmentation method based on risk control scenarios according to claim 1, characterized in that: The process of obtaining the original data set includes the following steps: Adjust the data type of the prediction variable according to the business scenario; the prediction variable can be numeric, character, or Boolean; perform stratified sampling based on the proportion of each type of sample in the historical customer data, and each sample of the historical customer data has a weight; The sampled data is divided into a training set and a test set based on time series partitioning; the training set is used for training and parameter estimation of the decision tree model, and the test set is used to verify the effect and performance of the decision tree model; Use the training set to train the decision tree model and estimate its parameters; weight the samples according to the weight variable.
3. The multi-bifurcation decision tree segmentation method based on risk control scenario according to claim 2, characterized in that: The process of dividing the sampled data into training and test sets includes the following steps: Determine the time point for dividing the training set and the test set, divide the time series customer historical data according to the determined time point, use the data before the time point as the training set, and the data after the time point as the test set; Perform seasonal-trend decomposition on the training set, decomposing the time series customer historical data into seasonal component and trend component; input the seasonal component and trend component in the training set into the reversible instance normalization layer respectively, and convert them into mean-centered distribution; The seasonal term component and trend term component of the mean center distribution are input into the Legendre projection unit respectively, and the time series representation vector is dynamically updated to obtain key historical information; the representation vectors of the seasonal term component and trend term component are input into the multi-layer perceptron neural network respectively to complete the mapping from the representation vector of the historical input sequence to the representation vector of the future sequence; Input the representation vectors of the seasonal component and the trend component of the future sequence customer historical data into the reconstruction unit in the Legendre projection unit respectively, and reconstruct the representation vector into the form of the original input by multiplying by the discrete Legendre polynomial matrix; The seasonal item component and trend item component of the reconstructed future sequence customer historical data are input into the reversible instance denormalization layer to restore them to their original distribution; the seasonal item component and trend item component of the obtained future sequence customer historical data are combined to obtain the final output future sequence customer historical data; and the prediction results of the future sequence customer historical data in the training set and the test set based on time series division are obtained.
4. The multi-bifurcation decision tree segmentation method based on risk control scenario according to claim 1, characterized in that: The process of obtaining the processed data set includes the following steps: Based on the data of the training set in the original customer historical data, calculate the odds of each value corresponding to each predictor variable; For each predictor variable, sort the original values from small to large according to the odds of the values, obtain the rank corresponding to each value, and establish a discrete attribute mapping table; By mapping the original value data to the rank, the original customer historical data is converted into numerical data for building a decision tree model.
5. The multi-bifurcation decision tree segmentation method based on risk control scenario according to claim 4 is characterized in that: The process of converting original customer historical data into numerical data includes the following steps: Calculate odds for each predictor variable: For each predictor variable, calculate the odds corresponding to each value; by calculating odds, evaluate the historical credit status of customers with different values. The higher the odds, the better the credit status of the customer corresponding to the value. For each predictor variable, sort the original values from small to large according to the odds of the values; arrange the values according to their corresponding credit status; According to the sorted values, a rank is assigned to each value, and a discrete attribute mapping table is established; the rank refers to the sequential position of the value after sorting, which is used to represent the relative credit status of the value; according to the discrete attribute mapping table, the discrete attributes in the original customer history data are mapped to numerical types; by using the rank corresponding to each value, the discrete attributes are converted into numerical types.
6. The multi-bifurcation decision tree segmentation method based on risk control scenario according to claim 5, characterized in that: Odds refers to the ratio of the number of people who repay normally to the number of people with overdue payments in the customer data corresponding to each category.
7. The multi-bifurcation decision tree segmentation method based on risk control scenario according to claim 1, characterized in that: The process of dividing the credit sample by multi-branch tree segmentation includes the following steps: Based on the current node data, traverse all feasible split points of each variable and select the split point with the largest Gini gain as the optimal split of the variable; Traverse all variables of the current node. If there is a feasible split point, based on the optimal split of each variable, select the variable with the largest Gini gain to divide the population, generate the lower-level nodes, and obtain two different populations.
8. The multi-bifurcation decision tree segmentation method based on risk control scenario according to claim 7, characterized in that: The Gini gain is calculated as follows: The Gini Gain obtained by dividing sample D according to feature A is: <h2 style=";text-align:left;direction:ltr">Gini_Gain<h2 style=";text-align:left;direction:ltr"> A <h2 style=";text-align:left;direction:ltr"> (D)=Gini(D)-Gini(D|A=a) Gini(D) is the Gini coefficient of data set D, formula: Gini(D|A=a) is the Gini coefficient after division, formula: Where n is the number of categories in the dataset D, p(y i ) is the category y in the dataset D i The proportion of samples in the dataset D; a represents a certain value of the feature variable A, which is used to divide the dataset D into two subsets; Gini(D|A=a): The Gini coefficient of the subset after division under the condition that the value of the feature variable A is a; where |D1| and |D2| represent the number of samples in the two subsets after division, Gini(D1) and Gini(D2) represent the Gini coefficients of the two subsets after division; good_rate represents the proportion of samples in the dataset D with the target variable being "good"; bad_rate: The proportion of samples in the dataset D with the target variable being "bad"; Gini(D|A=a) is the Gini coefficient of the subset after division under the condition that the value of feature A is a; Gini_Gain A The larger (D) is, the greater the role that feature A plays in sample classification.
9. The multi-bifurcation decision tree segmentation method based on risk control scenario according to claim 1, characterized in that: The process of splitting a multi-branch tree in a specified manner and with a specified number of branches includes the following steps: Select the splitting method and number of branches of the multi-branch tree based on actual needs; the splitting methods include: equal frequency splitting, equal distance splitting and Gini splitting; Split the variable based on the specified method and the specified number of branches; For discrete and Boolean attributes, the original values corresponding to the split points are found based on the obtained discrete attribute mapping table, and the discrete values contained in each branch are determined.
10. A multi-fork decision tree segmentation system based on risk control scenarios, characterized in that: Include: The data acquisition module is responsible for obtaining historical customer data from credit institutions, processing and sampling the data according to business scenarios, and obtaining the original data set; The data processing module is responsible for processing character and Boolean predictor variables based on the original data set, keeping the numerical variables unchanged, and obtaining the processed data set; The splitting execution module is responsible for performing multi-branch tree splitting on numerical variables, character and Boolean prediction variables in a specified manner and with a specified number of branches based on the processed data set.
Citation Information
Patent Citations
Crowd portrait extraction method, system, device and computer-readable medium coupled with decision tree
CN112836741B
Feature combination determination method and device, equipment, storage medium and program product
CN115221948A
Feature set determination method and device and electronic equipment
CN115456077A
Cited By
Training method for improving generalization ability of risk control model
CN120258540A