Variable processing method and device for admission model

By using the random forest model to screen variables with high importance in the personal credit access model and reducing the number of variables, the problems of high computational complexity and waste of resources are solved, and the efficiency and overall process efficiency of the access model are improved.

CN112734558BActive Publication Date: 2024-12-31INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011637185.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-12-31
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

The existing personal credit access model has high computational complexity when processing a large number of variables, is wasted resources and is inefficient, making it difficult to effectively reduce the number of variables, and at the same time retains high-importance variables to improve the model results.

Method used

By generating a wide data table, the variables are sampled using the preset sampling ratio, the random forest model is input to calculate the importance metric value, and after sorting, the first m variables are selected as input variables of the logistic regression model, and subsequent processing is performed such as missing value processing. , correlation calculation, etc.

Benefits of technology

It greatly reduces the computational amount of variable processing, improves efficiency, saves resources, and retains high-importance variables, ensuring the accuracy of model results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112734558B_ABST
    Figure CN112734558B_ABST
Patent Text Reader

Abstract

The present invention provides a variable processing method and device for an access model, which can be used in the financial field or other fields. The method includes: generating a data wide table according to the historical data corresponding to the access model; the data wide table includes n variables, n is a positive integer greater than 1; sampling the variables in the data wide table according to a preset sampling ratio, inputting the sampled variables into a preset random forest model, and obtaining the importance measurement value corresponding to each variable; determining the importance ranking of the variables from high to low according to the importance measurement value, and selecting the first m variables from the importance ranking as the input variables of the logistic regression model in the access model; wherein m is a positive integer less than n. The present invention uses a random forest model to perform variable screening, which can greatly improve the efficiency of subsequent variable processing, reduce artificial variable selection, thereby improving the work efficiency of the overall process of the access model, improving the overall timeliness of business processing, and saving a large amount of server resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of personal credit access model, and in particular to a variable processing method and device of an access model. Background Art

[0002] The customer access model has always been a top priority in the field of personal credit. Since the model requires a high degree of interpretability to customers, the logistic regression model has always been the best choice. However, while taking into account interpretability, the model must do more processing in terms of data. From the beginning of receiving data at the beginning of the access model, it will go through various processing such as data type processing, missing value single value calculation of data, and then call the logistic regression model. Regardless of whether the initial dimensions are hundreds or thousands or tens of thousands, most of the dimensions left by the logistic regression are within twenty. Therefore, if each step in the early stage is performed on the full dimension, it will undoubtedly increase a lot of unnecessary calculations and waste a lot of resources and time. Therefore, how to reduce the number of variables at the beginning of the access model, while retaining the variables with high importance will not have a significant impact on the model results or even improve them, which directly determines whether the calculation can be reduced, resources can be saved and efficiency can be improved when processing variables in the later stage. Summary of the invention

[0003] In response to the problems in the prior art, the main purpose of the embodiments of the present invention is to provide a variable processing method and device for an access model, thereby reducing the number of variables that need to be processed in the later stage of the access model, thereby reducing the amount of calculation, improving the efficiency of variable processing and saving resources.

[0004] In order to achieve the above object, an embodiment of the present invention provides a method for processing variables of an admission model, the method comprising:

[0005] Generate a data wide table according to the historical data corresponding to the admission model; wherein the data wide table includes n variables, where n is a positive integer greater than 1;

[0006] Sampling the variables in the data wide table according to a preset sampling ratio, inputting the sampled variables into a preset random forest model, and obtaining the importance measurement value corresponding to each variable;

[0007] Determine the importance ranking of the variables from high to low according to the importance metric value, and select the first m variables from the importance ranking as input variables of the logistic regression model in the admission model; wherein m is a positive integer less than n.

[0008] Optionally, in one embodiment of the present invention, the selecting the first m variables from the importance ranking as input variables of the logistic regression model in the access model includes: selecting the first m variables from the importance ranking, performing subsequent variable processing on the m variables, and using the variables subjected to the subsequent variable processing as input variables of the logistic regression model in the access model.

[0009] Optionally, in one embodiment of the present invention, the subsequent processing of the variables includes: missing value processing, single value processing, missing value filling processing, continuous and discrete variable distinction processing, calculation of WOE value and IV value, calculation of pairwise correlation and multicollinearity of variables, and univariate analysis processing.

[0010] Optionally, in one embodiment of the present invention, sampling the variables in the data wide table according to a preset sampling ratio, inputting the sampled variables into a preset random forest model, and obtaining the importance measure value corresponding to each variable includes: sampling the variables in the data wide table i times with replacement according to a preset sampling ratio, repeating the sampling k times, and obtaining k training samples and k out-of-bag data corresponding to the training samples one by one; wherein i and k are positive integers greater than 1; training the random forest model using the training samples to generate k decision trees corresponding to the training samples; and calculating the importance measure value of each variable based on the corresponding out-of-bag data using the decision trees.

[0011] Optionally, in one embodiment of the present invention, the use of the decision tree to calculate the importance measure of each variable according to the corresponding out-of-bag data includes: randomly selecting a variable in the wide data table as the variable to be measured, using each decision tree to calculate the corresponding out-of-bag data, and obtaining a first error value of the variable to be measured; randomly adding noise interference to the variable to be measured in each out-of-bag data, using each decision tree to calculate the corresponding out-of-bag data, and obtaining a second error value of the variable to be measured after the noise interference is added; obtaining the importance measure of the variable to be measured according to the first error value and the second error value; and randomly selecting a variable in the wide data table again as a new variable to be measured, and using the decision tree and the out-of-bag data to calculate the importance measure of the new variable to be measured, until the importance measure values ​​of all variables in the wide data table are obtained.

[0012] The embodiment of the present invention further provides a variable processing device for an admission model, the device comprising:

[0013] A data wide table module, used to generate a data wide table according to the historical data corresponding to the admission model; wherein the data wide table includes n variables, where n is a positive integer greater than 1;

[0014] An importance measurement value module is used to sample the variables in the data wide table according to a preset sampling ratio, input the sampled variables into a preset random forest model, and obtain the importance measurement value corresponding to each variable;

[0015] A variable screening module is used to determine the importance ranking of the variables from high to low according to the importance measurement value, and select the first m variables from the importance ranking as input variables of the logistic regression model in the access model; wherein m is a positive integer less than n.

[0016] Optionally, in one embodiment of the present invention, the variable screening module is also used to select the first m variables from the importance ranking, perform subsequent variable processing on the m variables, and use the variables that have undergone subsequent variable processing as input variables of the logistic regression model in the access model.

[0017] Optionally, in one embodiment of the present invention, the subsequent processing of the variables includes: missing value processing, single value processing, missing value filling processing, continuous and discrete variable distinction processing, calculation of WOE value and IV value, calculation of pairwise correlation and multicollinearity of variables, and univariate analysis processing.

[0018] Optionally, in one embodiment of the present invention, the importance measure module includes: a variable sampling unit, used to sample the variables in the data width table i times with replacement according to a preset sampling ratio, repeat the sampling k times, and obtain k training samples of size i and k out-of-bag data corresponding to the training samples one by one; wherein i and k are positive integers greater than 1; a decision tree unit, used to train the random forest model using the training samples, and generate k decision trees corresponding to the training samples; a measure unit, used to calculate the importance measure of each variable according to the corresponding out-of-bag data using the decision tree.

[0019] Optionally, in one embodiment of the present invention, the metric value unit includes: a first error value subunit, used to randomly select a variable in the data wide table as a variable to be measured, and use each decision tree to calculate the corresponding out-of-bag data to obtain a first error value of the variable to be measured; a second error value subunit, used to randomly add noise interference to the variable to be measured in each out-of-bag data, and use each decision tree to calculate the corresponding out-of-bag data to obtain a second error value of the variable to be measured after adding noise interference; a metric value subunit, used to obtain an importance metric value of the variable to be measured based on the first error value and the second error value; a variable selection subunit, used to randomly re-select a variable in the data wide table as a new variable to be measured, and use the decision tree and the out-of-bag data to calculate the importance metric value of the new variable to be measured until the importance metric values ​​of all variables in the data wide table are obtained.

[0020] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the program.

[0021] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.

[0022] The present invention uses the random forest model to perform variable screening, which can greatly improve the efficiency of subsequent variable processing and reduce manual variable selection, thereby improving the work efficiency of the overall process of the access model, improving the overall timeliness of business processing, and saving a large amount of server resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1 A flow chart of a variable processing method of an admission model according to an embodiment of the present invention;

[0025] Figure 2 It is a processing flow chart of the credit field access link in an embodiment of the present invention;

[0026] Figure 3 A flowchart of variable screening and subsequent processing of the admission model in an embodiment of the present invention;

[0027] Figure 4 A flowchart of establishing a random forest model in an embodiment of the present invention;

[0028] Figure 5 A flowchart of importance metric value calculation in an embodiment of the present invention;

[0029] Figure 6 A schematic diagram of the structure of a variable processing device of an admission model according to an embodiment of the present invention;

[0030] Figure 7 Schematic diagram of the structure of the importance measurement value module in an embodiment of the present invention;

[0031] Figure 8 This is a schematic diagram of the structure of a metric unit in an embodiment of the present invention;

[0032] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] An embodiment of the present invention provides a method and device for processing variables of an access model, which can be used in the financial field or other fields. It should be noted that the method and device for processing variables of the access model of the present invention can be used in the financial field, and can also be used in any field other than the financial field. The application field of the method and device for processing variables of the access model of the present invention is not limited.

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] The execution subject of the variable processing method of the admission model provided in the embodiment of the present invention includes but is not limited to a computer. Figure 1 The embodiment of the present invention is a method for processing variables of an admission model, and the method shown in the figure includes:

[0036] Step S1, generating a wide data table according to historical data corresponding to the admission model; wherein the wide data table includes n variables, and n is a positive integer greater than 1.

[0037] Among them, the access model is generally used in the field of personal credit. The access model mainly includes two parts: variable processing and model calling. Among them, the variable processing process mainly processes the variables of the data received from the upstream system, and the processed variables are subsequently processed by the called model. The model called by the model calling process in the access model is a logistic regression model, so the access model can also be called a logistic regression access model. Figure 2 The figure shows the processing of the credit access link, which includes seven parts. In the user application link, after the user applies, the first step is to judge the access rules. If the access rules are met, the user will enter the third-party and anti-fraud link for user screening. Only those who pass the screening will enter the logistic regression access model, and the model will score and judge the customer. Only when the customer's model score exceeds the established threshold will the customer be approved. During this period, all customers who do not meet the conditions will be rejected.

[0038] According to the data required by the access model, such as customer transaction information, the corresponding historical data is obtained from the upstream system. The obtained historical data is made into a data wide table, and the data recorded in the data wide table is the variable to be processed. The number of variables in the data wide table is generally large, up to thousands.

[0039] Step S2, sampling the variables in the data wide table according to a preset sampling ratio, inputting the sampled variables into a preset random forest model, and obtaining the importance measurement value corresponding to each variable.

[0040] The preset sampling ratio can be 80%, that is, each time the data is extracted with replacement, 80% of the variables in the table are selected. Sampling with replacement is performed i times according to the sampling ratio, and the i-time sampling with replacement obtains the training sample of a decision tree. Repeat k times to obtain k decision trees, and then form a random forest model. The training samples and out-of-bag data are input into the preset random forest model, wherein the preset of the random forest model is mainly to pre-set important parameters, for example, the number of decision trees included in the random forest model.

[0041] The importance measure of each variable is calculated using the random forest model. Specifically, the random forest model is trained using training samples to generate a preset number of decision trees. Each training sample can generate a decision tree. The importance measure of a variable is calculated using the decision tree and the out-of-bag data corresponding to the training sample that generated the decision tree.

[0042] Step S3, determining the importance ranking of the variables from high to low according to the importance metric value, and selecting the first m variables from the importance ranking as input variables of the logistic regression model in the admission model; wherein m is a positive integer less than n.

[0043] Among them, after obtaining the importance measurement value of each variable, the variables are sorted from high to low according to the importance measurement value. In the importance sorting, a preset number of variables are selected. For example, the top 50 variables in importance sorting are selected, and the selected 50 variables are used as input variables in the subsequent variable processing of the access model and the process of calling the logistic regression model. Therefore, by adding the random forest model to the variable processing before entering the logistic regression model, the variables that need to be processed in the early stage are reduced, and the variables with high importance are retained to ensure the effect of the final model. At the same time, it can also reduce the complexity of data processing before entering the logistic regression model and improve the timeliness of data processing.

[0044] Specifically, the present invention improves efficiency and saves resources more obviously when the initial variables of the logistic regression model are large (>1000). If the number of variables is about 1000, the logistic regression model needs to process each variable in the early stage. If the variables are ranked by importance through the random forest model, 50 variables with high importance are selected for subsequent data processing, and the number of variables processed in each step will be directly reduced from 1000 to 50.

[0045] As an embodiment of the present invention, selecting the first m variables from the importance ranking as input variables of the logistic regression model in the admission model includes: selecting the first m variables from the importance ranking, performing subsequent variable processing on the m variables, and using the variables that have undergone subsequent variable processing as input variables of the logistic regression model in the admission model.

[0046] In this embodiment, if Figure 3 As shown, the subsequent processing of variables includes: missing value processing, single value processing, missing value filling processing, continuous and discrete variable differentiation processing, calculation of WOE value and IV value, calculation of pairwise correlation and multicollinearity of variables, and univariate analysis processing.

[0047] Specifically, the variables screened by the random forest model are processed for missing values ​​and single values. Variables that meet the missing and single thresholds are left to fill in missing values, and continuous and discrete variables are binned. After that, the WOE value and IV value are calculated, and then the pairwise correlation and multicollinearity of the variables are calculated. If the correlation between the two variables is high, the variable with a higher IV value is selected for univariate analysis. The variables that meet the conditions of monotonic defect rate and customer ratio per box are sent to the logistic regression model for probability calculation and scoring. During this period, the variables that do not meet the conditions will be deleted one by one.

[0048] As an embodiment of the present invention, Figure 4 As shown, the process of establishing a random forest model is relatively simple. The importance ranking of variables is obtained by directly calling the random forest model, and then the top 50 variables with higher importance rankings (the number can be slightly adjusted to avoid insufficient variables entering the logistic regression) are processed later. Specifically, the variables in the data wide table are sampled according to a preset sampling ratio, and the sampled variables are input into the preset random forest model to obtain the importance measurement values ​​corresponding to each variable, including:

[0049] Step S41, according to a preset sampling ratio, sampling with replacement is performed on the variables in the data wide table i times, and the sampling is repeated k times to obtain k training samples of size i and k out-of-bag data corresponding to the training samples one by one; wherein i and k are positive integers greater than 1;

[0050] Step S42, training the random forest model using the training samples to generate k decision trees corresponding to the training samples;

[0051] Step S43, using the decision tree, calculate the importance measure of each variable according to the corresponding out-of-bag data.

[0052] Specifically, the preset sampling ratio can be 80%, that is, 80% of the variables in the data wide table are extracted with replacement each time. According to the sampling ratio, i training samples are selected from the data wide table as a training sample by sampling with replacement; a decision tree is generated using the sampled training samples. The following two points are achieved at each node of the generated tree: 1) j variables are randomly selected without duplication; 2) the sample set is divided using these j variables to find the best division variable, which can be determined by the Gini coefficient, information gain rate or information gain. Repeat the above method k times to obtain k decision trees.

[0053] Among them, the reason for choosing the random forest model is based on the basic characteristics of the model. The random forest model is not sensitive to the missing and single cases of variables, as well as the data types of variables. Before the logistic regression model receives data, the random forest model is used to pre-process all variables to be processed. The importance of all variables is ranked by the algorithm and characteristics of the random forest model. The TOP50 variables can be selected for subsequent missing value and single value processing, filling, continuous and discrete variable differentiation and binning, calculation of WOE and IV values, and subsequent univariate and multivariate analysis, and then sent to the logistic regression model. In this way, since the importance of variables is screened by the random forest model in the early stage, the importance of the remaining variables is relatively high, so it will not cause deviation to the final result of the logistic regression model, and will greatly reduce the number of variables to be processed in each step of variable processing, which will improve the calculation efficiency and save resources in each link.

[0054] In this embodiment, if Figure 5 As shown, using the decision tree, calculating the importance metric of each variable according to the corresponding out-of-bag data includes:

[0055] Step S51, randomly selecting a variable in the data wide table as a variable to be measured, and using each of the decision trees to calculate the corresponding out-of-bag data to obtain a first error value of the variable to be measured;

[0056] Step S52, randomly adding noise interference to the variables to be measured in each of the out-of-bag data, and using each of the decision trees to calculate the corresponding out-of-bag data to obtain a second error value of the variables to be measured after adding noise interference;

[0057] Step S53, obtaining an importance measurement value of the variable to be measured according to the first error value and the second error value;

[0058] Step S54, randomly reselect a variable in the wide data table as a new variable to be measured, and use the decision tree and out-of-bag data to calculate the importance measurement value of the new variable to be measured, until the importance measurement values ​​of all variables in the wide data table are obtained.

[0059] Specifically, for the importance measure of a variable X, the random forest model can adopt the following calculation method:

[0060] 1) For each decision tree in the random forest model, use the corresponding out-of-bag data (OOB) to calculate the out-of-bag data error of variable X, denoted as errOOB1;

[0061] 2) Randomly add noise interference to the variable X of all samples of the out-of-bag data OOB, and calculate the out-of-bag data error errOOB2 of the variable X again;

[0062] 3) Assuming that M decision trees are established in the random forest model, the importance measure for variable X is:

[0063] imp_X=∑(errOOB2-errOOB1) / M

[0064] The reason why the above formula can be used as a measure of the importance of a variable is that if the out-of-bag accuracy is greatly reduced after noise interference is added to a variable, it means that this variable has a great influence on the classification result of the sample, which means that it is relatively important.

[0065] In this way, the variables that are about to be analyzed and processed and finally enter the logistic regression are selected, and the variables with high importance are selected by using the variable importance selection method of the random forest model. In this way, the accuracy of the final logistic regression model can be guaranteed, and the number of variables that are about to be processed can be reduced, thereby reducing the complexity of data processing and saving time to improve efficiency. The variables with high importance selected by the random forest model are used as input data for establishing the logistic regression model, that is, the initial large wide table (1000+ dimensions) will obtain a small wide table (100- dimensions) after the random forest model selects the variables, but the data in this small wide table are all relatively important variables for the logistic regression model, which not only retains the most important information of the original data, but also greatly reduces the variables to simplify the subsequent processing, thereby ensuring the accuracy of the final logistic regression model, and at the same time, it can also improve the processing efficiency of the variables in each step.

[0066] After the random forest model is used to select variables, the processing time of each subsequent step can be greatly shortened, and the workload of variable selection can be reduced, the work efficiency of the overall process of the admission model can be improved, and the effect of the admission model has little effect. After the variables are selected, the number of dimensions processed in each subsequent step is sharply reduced, and the required computing power is also reduced, thereby saving a large amount of server resources.

[0067] like Figure 6FIG. 1 is a schematic diagram of a variable processing device for an admission model according to an embodiment of the present invention. The device shown in the figure includes:

[0068] The data wide table module 10 is used to generate a data wide table according to the historical data corresponding to the access model; wherein the data wide table includes n variables, where n is a positive integer greater than 1.

[0069] Among them, the access model is generally used in the field of personal credit. The access model mainly includes two parts: variable processing and model calling. Among them, the variable processing process mainly processes the variables of the data received from the upstream system, and the processed variables are subsequently processed by the called model. The model called by the model calling process in the access model is a logistic regression model, so the access model can also be called a logistic regression access model. Figure 2 The figure shows the processing of the credit access link, which includes seven parts. In the user application link, after the user applies, the first step is to judge the access rules. If the access rules are met, the user will enter the third-party and anti-fraud link for user screening. Only those who pass the screening will enter the logistic regression access model, and the model will score and judge the customer. Only when the customer's model score exceeds the established threshold will the customer be approved. During this period, all customers who do not meet the conditions will be rejected.

[0070] According to the data required by the access model, such as customer transaction information, the corresponding historical data is obtained from the upstream system. The obtained historical data is made into a data wide table, and the data recorded in the data wide table is the variable to be processed. The number of variables in the data wide table is generally large, up to thousands.

[0071] The importance measurement module 20 is used to sample the variables in the data wide table according to a preset sampling ratio, input the sampled variables into a preset random forest model, and obtain the importance measurement value corresponding to each variable.

[0072] Among them, the preset sampling ratio can be 80%, that is, each time the data is extracted with replacement, eighty percent of the variables in the table are selected. Sampling with replacement is performed i times according to the sampling ratio, repeated k times, and k decision trees are obtained to form a random forest model. The importance measure of each variable is calculated using the random forest model. Specifically, the random forest model is trained using training samples to generate a preset number of decision trees. Among them, each training sample can generate a decision tree. The importance measure of a variable is calculated using the decision tree and the out-of-bag data corresponding to the training sample that generated the decision tree.

[0073] The variable screening module 30 is used to determine the importance ranking of the variables from high to low according to the importance metric value, and select the first m variables from the importance ranking as input variables of the logistic regression model in the access model; wherein m is a positive integer less than n.

[0074] Among them, after obtaining the importance measurement value of each variable, the variables are sorted from high to low according to the importance measurement value. In the importance sorting, a preset number of variables are selected. For example, the top 50 variables in importance sorting are selected, and the selected 50 variables are used as input variables in the subsequent variable processing of the access model and the process of calling the logistic regression model. Therefore, by adding the random forest model to the variable processing before entering the logistic regression model, the variables that need to be processed in the early stage are reduced, and the variables with high importance are retained to ensure the effect of the final model. At the same time, it can also reduce the complexity of data processing before entering the logistic regression model and improve the timeliness of data processing.

[0075] Specifically, the present invention improves efficiency and saves resources more obviously when the initial variables of the logistic regression model are large (>1000). If the number of variables is about 1000, the logistic regression model needs to process each variable in the early stage. If the variables are ranked by importance through the random forest model, 50 variables with high importance are selected for subsequent data processing, and the number of variables processed in each step will be directly reduced from 1000 to 50.

[0076] As an embodiment of the present invention, the variable screening module is also used to select the first m variables from the importance ranking, perform variable post-processing on the m variables, and use the variables after variable post-processing as input variables of the logistic regression model in the admission model.

[0077] As an embodiment of the present invention, subsequent processing of variables includes: missing value processing, single value processing, missing value filling processing, continuous and discrete variable differentiation processing, calculation of WOE value and IV value, calculation of pairwise correlation and multicollinearity of variables, and univariate analysis processing.

[0078] As an embodiment of the present invention, Figure 7 As shown, the importance metric module 20 includes:

[0079] The variable sampling unit 21 is used to perform i-times of sampling with replacement on the variables in the data wide table according to a preset sampling ratio, repeat the sampling k times, and obtain k training samples of size i and k out-of-bag data corresponding to the training samples one by one; wherein i and k are positive integers greater than 1;

[0080] A decision tree unit 22, used to train the random forest model using the training samples to generate k decision trees corresponding to the training samples;

[0081] The metric unit 23 is used to calculate the importance metric of each variable according to the corresponding out-of-bag data using the decision tree.

[0082] As an embodiment of the present invention, Figure 8 As shown, the measurement value unit 23 includes:

[0083] A first error value subunit is used to randomly select a variable in the data wide table as a variable to be measured, and use each decision tree to calculate the corresponding out-of-bag data to obtain a first error value of the variable to be measured;

[0084] A second error value subunit is used to randomly add noise interference to the variable to be measured in each of the out-of-bag data, and use each of the decision trees to calculate the corresponding out-of-bag data to obtain a second error value of the variable to be measured after adding noise interference;

[0085] A metric subunit, configured to obtain an importance metric value of the variable to be measured according to the first error value and the second error value;

[0086] The variable selection subunit is used to randomly re-select a variable in the data wide table as a new variable to be measured, and use the decision tree and out-of-bag data to calculate the importance measurement value of the new variable to be measured until the importance measurement values ​​of all variables in the data wide table are obtained.

[0087] Based on the same application concept as the variable processing method of the above-mentioned admission model, the present invention also provides the variable processing device of the above-mentioned admission model. Since the principle of solving the problem by the variable processing device of the admission model is similar to that of the variable processing method of the admission model, the implementation of the variable processing device of the admission model can refer to the implementation of the variable processing method of the admission model, and the repeated parts will not be repeated.

[0088] The present invention uses the random forest model to perform variable screening, which can greatly improve the efficiency of subsequent variable processing and reduce manual variable selection, thereby improving the work efficiency of the overall process of the access model, improving the overall timeliness of business processing, and saving a large amount of server resources.

[0089] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the program.

[0090] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.

[0091] like Fig. 9As shown, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily have to include Fig. 9 In addition, the electronic device 600 may also include Fig. 9 For components not shown, reference may be made to the prior art.

[0092] like Fig. 9 As shown, the central processor 100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 100 receives inputs and controls the operations of various components of the electronic device 600.

[0093] The memory 140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 100 may execute the program stored in the memory 140 to implement information storage or processing.

[0094] The input unit 120 provides input to the CPU 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.

[0095] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 600 through the central processor 100.

[0096] The memory 140 may also include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 144 of the memory 140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0097] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processor 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0098] Based on different communication technologies, multiple communication modules 110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide an audio output via the speaker 131 and receive an audio input from the microphone 132, thereby realizing a common telecommunication function. The audio processor 130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 130 is also coupled to the central processor 100, so that the sound can be recorded on the local machine through the microphone 132, and the sound stored on the local machine can be played through the speaker 131.

[0099] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0100] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0101] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0103] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A variable processing method for an admission model, characterized in that: The method comprises: Generate a data wide table according to the historical data corresponding to the admission model; wherein the data wide table includes n variables, where n is a positive integer greater than 1; Sampling the variables in the data wide table according to a preset sampling ratio, inputting the sampled variables into a preset random forest model, and obtaining the importance measurement value corresponding to each variable; Determine the importance ranking of the variables from high to low according to the importance metric value, and select the first m variables from the importance ranking as input variables of the logistic regression model in the admission model; wherein m is a positive integer less than n; The step of selecting the first m variables from the importance ranking as input variables of the logistic regression model in the admission model includes: Selecting the first m variables from the importance ranking, performing variable post-processing on the m variables, and using the variables after the variable post-processing as input variables of the logistic regression model in the admission model; The subsequent processing of the variables includes: missing value processing, single value processing, missing value filling processing, continuous and discrete variable differentiation processing, calculation of WOE value and IV value, calculation of pairwise correlation and multicollinearity of variables, and univariate analysis processing; specifically: Perform missing value processing and single value processing on the first m variables; perform missing value filling processing and continuous and discrete variable differentiation processing on the variables that meet the requirements of missing value processing and single value processing; calculate the WOE value and IV value of the processed variables, as well as the pairwise correlation and multicollinearity of the processed variables; perform univariate analysis on the variables with higher pairwise correlation and IV value among the processed variables, and use the variables that meet the conditions of monotonic defect rate and proportion of customers per box as input variables of the logistic regression model.

2. The method according to claim 1, characterized in that The variables in the data wide table are sampled according to a preset sampling ratio, and the sampled variables are input into a preset random forest model to obtain the importance measurement value corresponding to each variable, including: According to a preset sampling ratio, the variables in the data wide table are sampled i times with replacement, and the sampling is repeated k times to obtain k training samples of size i and k out-of-bag data corresponding to the training samples one by one; wherein i and k are positive integers greater than 1; Using the training samples to train the random forest model, generating k decision trees corresponding to the training samples; The decision tree is used to calculate the importance measure of each variable based on the corresponding out-of-bag data.

3. The method according to claim 2, characterized in that The use of the decision tree to calculate the importance metric value of each variable according to the corresponding out-of-bag data includes: Randomly select a variable in the data wide table as a variable to be measured, and use each decision tree to calculate the corresponding out-of-bag data to obtain a first error value of the variable to be measured; Randomly adding noise interference to the variable to be measured in each of the out-of-bag data, and using each of the decision trees to calculate the corresponding out-of-bag data to obtain a second error value of the variable to be measured after adding the noise interference; Obtaining an importance measurement value of the variable to be measured according to the first error value and the second error value; A variable in the wide data table is randomly selected again as a new variable to be measured, and the importance measurement value of the new variable to be measured is calculated using the decision tree and out-of-bag data until the importance measurement values ​​of all variables in the wide data table are obtained.

4. A variable processing device for an admission model, characterized in that: The device comprises: A data wide table module, used to generate a data wide table according to the historical data corresponding to the admission model; wherein the data wide table includes n variables, where n is a positive integer greater than 1; An importance measurement value module is used to sample the variables in the data wide table according to a preset sampling ratio, input the sampled variables into a preset random forest model, and obtain the importance measurement value corresponding to each variable; A variable screening module, used to determine the importance ranking of the variables from high to low according to the importance measurement value, and select the first m variables from the importance ranking as input variables of the logistic regression model in the admission model; wherein m is a positive integer less than n; The variable screening module is also used to select the first m variables from the importance ranking, perform variable post-processing on the m variables, and use the variables that have undergone variable post-processing as input variables of the logistic regression model in the admission model; The subsequent processing of the variables includes: missing value processing, single value processing, missing value filling processing, continuous and discrete variable differentiation processing, calculation of WOE value and IV value, calculation of pairwise correlation and multicollinearity of variables, and univariate analysis processing; specifically: Perform missing value processing and single value processing on the first m variables; perform missing value filling processing and continuous and discrete variable distinction processing on the variables that meet the requirements of missing value processing and single value processing; calculate the WOE value and IV value of the processed variables, as well as the pairwise correlation and multicollinearity of the processed variables; perform univariate analysis on the variables with higher pairwise correlation and IV values ​​among the processed variables; and use the variables that meet the conditions of monotonic defect rate and customer proportion per box as input variables of the logistic regression model.

5. The device according to claim 4, characterized in that The importance measurement module includes: A variable sampling unit, used to perform i-times of sampling with replacement on the variables in the data wide table according to a preset sampling ratio, repeat the sampling k times, and obtain k training samples of size i and k out-of-bag data corresponding to the training samples one by one; wherein i and k are positive integers greater than 1; A decision tree unit, used to train the random forest model using the training samples to generate k decision trees corresponding to the training samples; The metric unit is used to calculate the importance metric of each variable according to the corresponding out-of-bag data using the decision tree.

6. The device according to claim 5, characterized in that The measurement value unit includes: A first error value subunit is used to randomly select a variable in the data wide table as a variable to be measured, and use each decision tree to calculate the corresponding out-of-bag data to obtain a first error value of the variable to be measured; A second error value subunit is used to randomly add noise interference to the variable to be measured in each of the out-of-bag data, and use each of the decision trees to calculate the corresponding out-of-bag data to obtain a second error value of the variable to be measured after adding noise interference; A metric subunit, configured to obtain an importance metric value of the variable to be measured according to the first error value and the second error value; The variable selection subunit is used to randomly re-select a variable in the data wide table as a new variable to be measured, and use the decision tree and out-of-bag data to calculate the importance measurement value of the new variable to be measured until the importance measurement values ​​of all variables in the data wide table are obtained.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 3 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Ultra-dense network resource allocation method based on prediction of change in number of access users

    CN107509202A

  • Risk control model establishing method and device, computer equipment and storage medium

    CN110503566A

  • Credit evaluation model based on breadth learning

    CN111104975A