Resource recovery risk prediction method, device and electronic equipment
By constructing original feature variables and generating binary feature variables, combined with the fusion technology of multiple classification models, the accuracy and stability of existing resource recovery risk assessment methods are solved, and more efficient risk prediction results are achieved.
Patent Information
- Application Number
- CN202110161751.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-05
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-02-05
AI Technical Summary
The existing resource recovery risk assessment methods have problems with low evaluation accuracy, poor stability and generalization, which affect the evaluation effect.
By obtaining user behavior data, the original feature variable is constructed, and binary feature variables are generated through a random forest model. Then, multiple different types of classification models are trained using feature variables, and the model is fused through AdaBoost to form the final predictive model.
It improves the interpretability, stability and generalization of the prediction model in resource recycling business, effectively prevents and controls resource recycling risks, and improves the evaluation effect.
Smart Images

Figure CN112508697B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer information processing technology, and in particular to a resource recovery risk prediction method, device, electronic device and computer-readable medium. Background Art
[0002] In Internet-based application technologies, it is often necessary to exchange resources between different participants. The resources referred to here refer to any material, information, money, time, etc. that can be used. Among them, information resources include computing resources and various types of data resources. Data resources include various special data in various fields. Resources related to money are also generally referred to as financial resources. After the financial resource exchange period expires, financial service institutions need to recover the financial resources. Before the expiration of the exchange period, major adverse changes in the financial and business conditions of credit users are likely to affect their ability to perform, thereby causing risks such as bad debts and bad debts. Therefore, in order to reduce the probability of such resource recovery risks, financial service institutions need to conduct resource recovery risk assessments on credit users before exchanging financial resources.
[0003] At present, machine learning models are mainly used to evaluate resource recovery risks, such as the scoring card model based on the Logistic algorithm, the XGBoost model, etc. Due to the large differences in sample distribution of resource recovery business, these methods generally have problems such as low evaluation accuracy, poor stability and generalization, which affects the evaluation effect. Summary of the invention
[0004] The present invention aims to solve the technical problem that the existing resource recovery risk assessment effect is poor.
[0005] In order to solve the above technical problems, the first aspect of the present invention provides a resource recovery risk prediction method, the method comprising:
[0006] Acquire user behavior data as an original sample set, and select original feature variables from the original sample set;
[0007] Randomly sampling from the original sample set to obtain a new sample set;
[0008] Generate a binary feature variable through a first model based on the new sample set;
[0009] Using feature variables to train multiple different types of classification models respectively; the feature variables include the binary feature variables, or the feature variables are generated by splicing the original feature variables and the binary feature variables;
[0010] Obtain characteristic variables of the training sample set and the test sample set respectively;
[0011] Based on the characteristic variables of the training sample set, the multiple different types of classification models are integrated to obtain a prediction model;
[0012] The characteristic variables of the test sample set are input into the prediction model to obtain a risk prediction sequence.
[0013] According to a preferred implementation manner of the present invention, the first model is a random forest model.
[0014] According to a preferred implementation manner of the present invention, generating a binary feature variable based on the new sample set through a first model includes:
[0015] Inputting the new sample set into a random forest model to train a tree model;
[0016] Get the leaf node ID of the trained tree model;
[0017] Encoding the leaf node ID to construct a leaf node feature;
[0018] The leaf node features are used as binary feature variables.
[0019] According to a preferred implementation manner of the present invention, a new sample set is obtained by randomly sampling from the original sample set using the BootStrap method.
[0020] According to a preferred implementation manner of the present invention, the classification model includes: at least two of a random forest model, a logistic regression model, and a Fisher model.
[0021] According to a preferred implementation of the present invention, AdaBoost is used to fuse the multiple different types of classification models based on feature variables of a training sample set.
[0022] In order to solve the above technical problems, the second aspect of the present invention provides a resource recovery risk prediction device, the device comprising:
[0023] A first acquisition module is used to acquire user behavior data as an original sample set and select original feature variables from the original sample set;
[0024] A sampling module, used for randomly sampling from the original sample set to obtain a new sample set;
[0025] A generating module, configured to generate a binary feature variable through a first model based on the new sample set;
[0026] A training module, used to respectively train a plurality of different types of classification models using feature variables; the feature variables include the binary feature variables, or the feature variables are generated by concatenating the original feature variables and the binary feature variables;
[0027] The second acquisition module is used to respectively acquire characteristic variables of the training sample set and the test sample set;
[0028] A fusion module, used for fusing the multiple different types of classification models based on the characteristic variables of the training sample set to obtain a prediction model;
[0029] The prediction module is used to input the characteristic variables of the test sample set into the prediction model to obtain a risk prediction sequence.
[0030] According to a preferred implementation manner of the present invention, the first model is a random forest model.
[0031] According to a preferred embodiment of the present invention, the generating module comprises:
[0032] A sub-training module, used for inputting the new sample set into a random forest model to train a tree model;
[0033] The sub-acquisition module is used to obtain the leaf node ID of the trained tree model;
[0034] An encoding module, used for encoding the leaf node ID to construct a leaf node feature;
[0035] A determination module is used to use the leaf node features as binary feature variables.
[0036] According to a preferred implementation manner of the present invention, the sampling module obtains a new sample set by randomly sampling from the original sample set through a BootStrap method.
[0037] According to a preferred implementation manner of the present invention, the classification model includes: at least two of a random forest model, a logistic regression model, and a Fisher model.
[0038] According to a preferred implementation manner of the present invention, the fusion module uses AdaBoost to fuse the multiple different types of classification models based on feature variables of a training sample set.
[0039] In order to solve the above technical problems, the third aspect of the present invention provides an electronic device, including:
[0040] Processor; and
[0041] A memory storing computer executable instructions, which when executed cause the processor to perform the above method.
[0042] To solve the above technical problem, the fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the above method is implemented.
[0043] The present invention constructs original feature variables based on the original sample set, generates binary feature variables through the first model in a random sampling manner, and then trains multiple different types of classification models based on the binary feature variables, or the binary feature variables and the original feature variables; and fuses multiple classification models to obtain the final prediction model. The original feature variables constructed by the present invention ensure the interpretability and stability of the prediction model in the resource recovery business; the binary feature variables improve the generalization and stability of the prediction model in the resource recovery business; and the number of binary feature variables, or binary feature variables and original feature variables used to train the classification model of the present invention can reach 100+, which can eliminate the phenomenon of users brushing points in the resource recovery business from the source and enhance the credibility of the prediction model. Compared with pure machine learning models, the present invention can maintain a high-precision prediction effect in the resource recovery business, and maintain good stability and generalization, and can effectively prevent and control resource recovery risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to make the technical problems solved by the present invention, the technical means adopted and the technical effects achieved more clearly, the specific embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, it should be noted that the drawings described below are only drawings of exemplary embodiments of the present invention, and those skilled in the art can obtain drawings of other embodiments based on these drawings without creative work.
[0045] Figure 1 It is a flow chart of a resource recovery risk prediction method of the present invention;
[0046] Figure 2 It is a schematic diagram of generating binary features of the present invention;
[0047] Figure 3 It is a schematic diagram of the structural framework of a resource recovery risk prediction device of the present invention;
[0048] Figure 4 is a structural block diagram of an exemplary embodiment of an electronic device according to the present invention;
[0049] Figure 5 is a schematic diagram of an embodiment of a computer readable medium of the present invention. DETAILED DESCRIPTION
[0050] The exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. Although each exemplary embodiment can be implemented in a variety of specific ways, it should not be understood that the present invention is limited to the embodiments set forth herein. On the contrary, these exemplary embodiments are provided to make the content of the present invention more complete and to facilitate the comprehensive communication of the inventive concept to those skilled in the art.
[0051] Under the premise of conforming to the technical concept of the present invention, the structure, performance, effect or other characteristics described in a specific embodiment may be combined with one or more other embodiments in any appropriate manner.
[0052] In the process of introducing specific embodiments, the detailed description of the structure, performance, effect or other characteristics is to enable those skilled in the art to fully understand the embodiments. However, it does not exclude that those skilled in the art can implement the present invention with a technical solution that does not contain the above-mentioned structure, performance, effect or other characteristics under certain circumstances.
[0053] The flowchart in the accompanying drawings is only an exemplary process demonstration, and does not mean that the solution of the present invention must include all the contents, operations and steps in the flowchart, nor does it mean that it must be executed in the order shown in the figure. For example, some operations / steps in the flowchart can be decomposed, some operations / steps can be combined or partially combined, etc. The execution order shown in the flowchart can be changed according to the actual situation without departing from the main purpose of the present invention.
[0054] Frames in the attached figure Figure 1 Generally, it refers to functional entities, which do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0055] The same reference numerals in the drawings represent the same or similar elements, components or parts, and thus the repeated description of the same or similar elements, components or parts may be omitted below. It should also be understood that although the first, second, third and other attributives representing the numbers may be used herein to describe various devices, elements, components or parts, these devices, elements, components or parts should not be limited by these attributives. In other words, these attributives are only used to distinguish one from another. For example, the first device may also be called the second device, but it does not deviate from the essential technical solution of the present invention. In addition, the terms "and / or" and "and / or" refer to all combinations including any one or more of the listed items.
[0056] See also Figure 1 , Figure 1This is a flow chart of a resource recovery risk prediction method provided by the present invention. Figure 1 As shown, the method includes:
[0057] S1. Obtain user behavior data as an original sample set, and select original feature variables from the original sample set;
[0058] Among them, the acquisition of user behavior data must be based on user authorization and obtained in a legal manner. The user behavior data includes: location information, communication information, device information, operator information, social information, resource-related behavior information, and credit information obtained through third-party platforms, etc. The communication information may include address book information and call record information; the device information refers to the model of the terminal device used by the user; the social information may be data information in the user's social software; the resource-related behavior information mainly refers to financial resource-related behavior information, including but not limited to: registration information, resource request information, resource overdue return information, etc. The credit information includes: multiple debt information, credit score information, etc.
[0059] After obtaining user behavior data, data cleaning operations are required, mainly including: data mapping, time variable processing, one-hot encoder, missing processing, unique string variable parsing, etc., so that the data becomes the original sample set for building the model.
[0060] After obtaining the original sample set, it is necessary to screen the feature variables. Specifically, the feature variable ranking can be obtained through IV (Information Value) analysis, correlation, hypothesis testing and other methods based on the univariate analysis method, and then the feature variables with strong predictiveness can be selected according to the preset variable threshold. In addition, the variables can be further cross-analyzed, and the variables that are related in the business can be cross-transformed. For example, the city field and the multi-debt field can be cross-transformed to analyze whether the multi-debt distribution of certain cities shows a certain pattern, so that this cross variable can also be used as the original feature variable in the machine learning process.
[0061] S2. randomly sampling from the original sample set to obtain a new sample set;
[0062] In the present invention, a new sample set is obtained by randomly sampling from the original sample set through the BootStrap method. The BootStrap method is a simulated sampling statistical inference method based on the original data, which can be used to study the distribution characteristics of a certain statistic of a set of data, and is particularly suitable for those problems that are difficult to derive interval estimation of parameters and hypothesis testing by conventional methods. The basic idea is: resampling with replacement is performed within the range of the original data, the sample size is still n, and the probability of each observation unit in the original data being drawn each time is equal, which is 1 / n. The obtained sample is called a Bootstrap sample. Thus, an estimated value of the parameter θ can be obtained. , and repeat this several times.
[0063] Suppose the original sample set X = [x1, x2, ..., xn] is an independent and identically distributed sample xi~F(x), i = 1, 2, ..., n. R(X, F) is a pre-selected random variable, which is a function of X and F. Now it is required to estimate the distribution characteristics of R(X, F) based on the original sample set [x1, x2, ..., xn]. For example, suppose is a parameter of the overall distribution F, is the overall distribution with respect to the parameter The expression of Fn is the empirical distribution function of the original sample set [x1, x2, ..., xn], is the estimated value of θ, and the estimation error is recorded as:
[0064]
[0065] Now we need to estimate the distribution characteristics of R(X, F) from the original sample set X = [x1, x2, ..., xn]. The essence of the Bootstrap method is a resampling process. The basic steps for calculating the distribution characteristics of R(X, F) are as follows:
[0066] S21, constructing an empirical distribution function Fn according to the original sample set X = [x1, x2, ..., xn];
[0067] S22. Extract samples from the empirical distribution function Fn , call it Bootstrap sample;
[0068] S23. Calculate the corresponding Bootstrap statistic R*(X*,Fn), which is expressed as:
[0069]
[0070] in, is the empirical distribution function of the Bootstrap sample; Rn is the Bootstrap statistic of Tn.
[0071] S24, repeat steps S22-S23 N times to obtain N possible values of the Bootstrap statistic R*(X*,Fn);
[0072] S25. Use the distribution of R*(X*, Fn) to approximate the distribution of R(X, F), that is, use the distribution of Rn to approximate the distribution of Tn, and you can get N possible values of the parameter θ(F). You can then statistically determine the distribution of the parameter θ and its eigenvalue.
[0073] S3, generating a binary feature variable through a first model based on the new sample set;
[0074] In the present invention, the first model can adopt any classification model, preferably a random forest model. The random forest model is a classifier including multiple decision trees, and the category of its output is determined by the mode of the category output by the individual trees.
[0075] Specifically, this step includes:
[0076] S31, inputting the new sample set into a random forest model to train a tree model;
[0077] S32, obtaining the leaf node ID of the trained tree model;
[0078] S33, encoding the leaf node ID to construct a leaf node feature;
[0079] S34. Use the leaf node features as binary feature variables.
[0080] For example, Figure 2 As shown in the figure, we can first use the RandomForestClassifier provided by the phthon algorithm library sklearn as a trainer, train a tree model using the new sample set Y in the form of Tree Splits, use the trained tree model to construct the Transformed Features feature, and then use the apply interface provided by RandomForestClassifier to get the ID of the leaf node, and then use OneHotEncoder to onehot encode the leaf node ID to construct the leaf node feature W. i , and the leaf node feature W i As a binary feature variable. Where i=1,...,m, m is the total dimension of leaf node features. Onehot encoding, also known as "unique hot encoding", is to encode N states with an N-bit state register, each state has an independent register bit, and only one of these register bits is valid.
[0081] S4, using feature variables to train multiple different types of classification models;
[0082] The feature variables include the binary feature variables. For example, based on the new sample set, a 254-dimensional leaf node feature can be trained through step S3. Figure 2 As shown, the 254-dimensional leaf node feature W i It can be directly input as a feature variable into the classification model G. Alternatively, the feature variable is generated by concatenating the original feature variable and the binary feature variable; for example, based on the new sample set, a 254-dimensional leaf node feature can be trained through step S3, and then the 115-dimensional original feature variable extracted in step S1 is added, and all these 369-dimensional variables can be input into the classification model G as feature variables.
[0083] In the present invention, the classification model includes at least two of a random forest model, a logistic regression model, and a fisher model. Before training, the feature variables can be further screened by analyzing the collinearity and correlation of the feature variables to improve the distinguishing ability of the classification model.
[0084] S5, respectively obtaining characteristic variables of the training sample set and the test sample set;
[0085] The training sample may be historical user behavior data, and the test sample may be current user behavior data. The user behavior data may be the same as the behavior data in step S1.
[0086] S6. Based on the characteristic variables of the training sample set, the multiple different types of classification models are integrated to obtain a prediction model;
[0087] In the present invention, AdaBoost is used to fuse the multiple different types of classification models based on the characteristic variables of the training sample set. Adaboost is an iterative algorithm, and its core idea is to train different classifiers (weak classifiers) for the same training set, and then combine these weak classifiers to form a stronger final classifier (strong classifier). The algorithm itself is implemented by changing the data distribution. It determines the weight of each sample based on whether the classification of each sample in each training set is correct and the accuracy of the last overall classification. The new data set with modified weights is sent to the lower classifier for training, and finally the classifiers obtained from each training are finally fused as the final decision classifier. The specific steps are as follows:
[0088] S60, input training data set T = (x i ,y i ), where x i is the feature vector, y iis the category label, whose value is 1 or -1, i=1, 2…N, and the number of iterations is M.
[0089] S61. Initialize the weights of training samples ;
[0090] S62, according to the current weight u of the training sample i Learn the mth classification model G m (x);
[0091] S63, obtain the mth classification model G m (x) Current error rate in the training sample set:
[0092] ;
[0093] Where: P represents probability.
[0094] S64. Calculate the mth classification model G m (x) Weight in the fusion model
[0095] :
[0096] S65. Calculate scaling factor ;
[0097] S66. Update the weight of the training sample ; Among them, Z m is a normalization factor, which reduces the weight of correctly classified samples and increases the weight of incorrectly classified samples.
[0098] S67. Repeat steps S62 to S66 M times to obtain a final fused prediction model G(x).
[0099] S7. Input the characteristic variables of the test sample set into a prediction model to obtain a risk prediction sequence.
[0100] Table 1 is a comparison of the model evaluation results after the actual samples are input into the prediction model of the present invention and the model evaluation results after the actual samples are input into the Logistic model. Table 2 is a comparison of the model evaluation results after the actual samples are input into the prediction model of the present invention and the model evaluation results after the actual samples are input into the XgBoost model. Among them, KS is a tool used to measure the accuracy of the classification model. The larger the KS value, the greater the degree to which the model can distinguish between positive and negative customers. The AR (Accuracy Ratio) value is a relatively commonly used indicator in the evaluation of resource recovery risk control models. AR = (the area between the actual CAP curve and the random curve) / (the area between the ideal CAP curve and the random). The CAP (Cumulative Accuracy Profile) curve measures the ability of the risk prediction model to detect risks (that is, bad users). The larger the AR value, the more discriminative the model is, and the better it can separate positive and negative samples. In Tables 1 and 2, the KS and AR values are the values after the actual values are enlarged 100 times.
[0101] Table 1 Comparison of model evaluation results between the prediction model and the Logistic model
[0102]
[0103] Table 2 Comparison of model evaluation results between the prediction model and the XgBoost model
[0104]
[0105] Combining Table 1 and Table 2, it can be seen that the prediction model of the present invention has a significant improvement in the distinguishing ability compared with the pure machine learning model Logistics model, which can increase the KS / AR value by about 0.05, while continuing the stability and interpretability of the Logistics model; the prediction model of the present invention has an absolute advantage in stability and generalization over the pure machine learning model XgBooSt model, and its distinguishing ability is also superior.
[0106] The present invention forms a new prediction model by integrating the feature generation technology of the random forest model, the binary classification technology of logistic, and the model fusion technology of AdaBoost, so that the final risk model maintains both a high model effect and good stability and generalization.
[0107] Figure 3 is a schematic diagram of the architecture of a resource recovery risk prediction device of the present invention, such as Figure 3 As shown, the device comprises:
[0108] A first acquisition module 31 is used to acquire user behavior data as an original sample set, and select original feature variables from the original sample set;
[0109] A sampling module 32, used for randomly sampling from the original sample set to obtain a new sample set;
[0110] A generating module 33, configured to generate a binary feature variable through a first model based on the new sample set;
[0111] The training module 34 is used to respectively train a plurality of different types of classification models using feature variables; the feature variables include the binary feature variables, or the feature variables are generated by concatenating the original feature variables and the binary feature variables; wherein the classification models include at least two of a random forest model, a logistic regression model, and a Fisher model.
[0112] A second acquisition module 35 is used to respectively acquire characteristic variables of the training sample set and the test sample set;
[0113] A fusion module 36, configured to fuse the multiple different types of classification models based on the characteristic variables of the training sample set to obtain a prediction model;
[0114] The prediction module 37 is used to input the characteristic variables of the test sample set into the prediction model to obtain a risk prediction sequence.
[0115] In the present invention, the first model is preferably a random forest model. Then the generation module 33 includes:
[0116] A sub-training module, used for inputting the new sample set into a random forest model to train a tree model;
[0117] The sub-acquisition module is used to obtain the leaf node ID of the trained tree model;
[0118] An encoding module, used for encoding the leaf node ID to construct a leaf node feature;
[0119] A determination module is used to use the leaf node features as binary feature variables.
[0120] In a specific implementation, the sampling module 32 obtains a new sample set by randomly sampling from the original sample set using the BootStrap method.
[0121] The fusion module uses AdaBoost to fuse the multiple different types of classification models based on the feature variables of the training sample set.
[0122] Those skilled in the art will appreciate that the modules in the above device embodiments may be distributed in the device as described, or may be changed accordingly and distributed in one or more devices different from the above embodiments. The modules in the above embodiments may be combined into one module, or may be further split into multiple submodules.
[0123] The electronic device embodiment of the present invention is described below, and the electronic device can be regarded as a physical implementation of the method and device embodiments of the present invention described above. The details described in the electronic device embodiment of the present invention should be regarded as a supplement to the above method or device embodiments; details not disclosed in the electronic device embodiment of the present invention can be implemented with reference to the above method or device embodiments.
[0124] Figure 4 is a structural block diagram of an exemplary embodiment of an electronic device according to the present invention. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0125] like Figure 4 As shown, the electronic device 400 of this exemplary embodiment is in the form of a general data processing device. The components of the electronic device 400 may include, but are not limited to: at least one processing unit 410, at least one storage unit 420, a bus 430 connecting different electronic device components (including the storage unit 420 and the processing unit 410), a display unit 440, etc.
[0126] The storage unit 420 stores a computer-readable program, which may be a source program or a code of a read-only program. The program may be executed by the processing unit 410, so that the processing unit 410 performs the steps of various embodiments of the present invention. For example, the processing unit 410 may perform the following steps: Figure 1 Steps shown.
[0127] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 4201 and / or a cache storage unit 4202, and may further include a read-only storage unit (ROM) 4203. The storage unit 420 may also include a program / utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 include but are not limited to: operating electronic devices, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0128] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0129] The electronic device 400 may also communicate with one or more external devices 300 (e.g., keyboard, display, network device, Bluetooth device, etc.) so that a user can interact with the electronic device 400 via these external devices 300, and / or enable the electronic device 400 to communicate with one or more other data processing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 450, and may also be performed through a network adapter 460 with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet). The network adapter 460 may communicate with other modules of the electronic device 400 through the bus 430. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID electronic devices, tape drives, and data backup storage electronic devices, etc.
[0130] Figure 5 Schematic diagram of a computer readable medium embodiment of the present invention. Figure 5As shown, the computer program can be stored on one or more computer-readable media. The computer-readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electronic device, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. When the computer program is executed by one or more data processing devices, the computer-readable medium can implement the above-mentioned method of the present invention, namely: obtaining user behavior data as an original sample set, and selecting original feature variables from the original sample set; randomly sampling from the original sample set to obtain a new sample set; generating binary feature variables through a first model based on the new sample set; using feature variables to train multiple different types of classification models respectively; the feature variables include the binary feature variables, or the feature variables are generated by splicing the original feature variables and the binary feature variables; obtaining feature variables of the training sample set and the test sample set respectively; fusing the multiple different types of classification models based on the feature variables of the training sample set to obtain a prediction model; inputting the feature variables of the test sample set into the prediction model to obtain a risk prediction sequence.
[0131] Through the description of the above implementation modes, it is easy for those skilled in the art to understand that the exemplary embodiments described in the present invention can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation mode of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a data processing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the present invention.
[0132] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction-executing electronic device, device, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0133] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., as well as conventional procedural programming languages such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0134] In summary, the present invention can be implemented by a method, apparatus, electronic device or computer-readable medium that executes a computer program. In practice, a general-purpose data processing device such as a microprocessor or a digital signal processor (DSP) can be used to implement some or all of the functions of the present invention.
[0135] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the present invention is not inherently related to any specific computer, virtual device or electronic device, and various general devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A resource recovery risk prediction method, characterized in that: The method comprises: Obtain user behavior data as an original sample set, and select original feature variables from the original sample set through univariate analysis and variable cross analysis; the original sample set has sample distribution differences; user behavior data includes location information, communication information, device information, operator information, social information, resource-related behavior information, and credit information obtained through a third-party platform; Randomly sampling from the original sample set to obtain a new sample set; Inputting the new sample set into a random forest model to train a tree model; Get the leaf node ID of the trained tree model; Encoding the leaf node ID to construct a leaf node feature; Taking the leaf node features as binary feature variables; The characteristic variables are further screened by analyzing their collinearity and correlation; The screened feature variables are used to train a plurality of different types of classification models respectively; the feature variables include the binary feature variables, or the feature variables are generated by splicing the original feature variables and the binary feature variables; Obtain characteristic variables of the training sample set and the test sample set respectively; AdaBoost is used to fuse the multiple different types of classification models based on the feature variables of the training sample set to obtain a prediction model; Inputting the characteristic variables of the test sample set into a prediction model to obtain a risk prediction sequence; Among them, the original feature variables ensure the interpretability and stability of the prediction model in the resource recycling business; the binary feature variables improve the generalization and stability of the prediction model in the resource recycling business.
2. The method according to claim 1, characterized in that A new sample set is obtained by randomly sampling from the original sample set using the BootStrap method.
3. The method according to claim 1, characterized in that The classification model includes: at least two of a random forest model, a logistic regression model, and a Fisher model.
4. A resource recovery risk prediction device, characterized in that: The device comprises: The first acquisition module is used to acquire user behavior data with sample distribution differences as an original sample set, and select original feature variables from the original sample set through univariate analysis and variable cross analysis; the user behavior data includes location information, communication information, device information, operator information, social information, resource-related behavior information, and credit information obtained through a third-party platform; A sampling module, used for randomly sampling from the original sample set to obtain a new sample set; A sub-training module, used for inputting the new sample set into a random forest model to train a tree model; The sub-acquisition module is used to obtain the leaf node ID of the trained tree model; An encoding module, used for encoding the leaf node ID to construct a leaf node feature; A determination module, used for taking the leaf node features as binary feature variables; The screening module is used to further screen the feature variables by analyzing the collinearity and correlation of the feature variables; A training module, used to respectively train a plurality of different types of classification models using the screened feature variables; the feature variables include the binary feature variables, or the feature variables are generated by concatenating the original feature variables and the binary feature variables; The second acquisition module is used to respectively acquire characteristic variables of the training sample set and the test sample set; A fusion module, used to fuse the multiple different types of classification models based on the feature variables of the training sample set using AdaBoost to obtain a prediction model; A prediction module, used for inputting the characteristic variables of the test sample set into a prediction model to obtain a risk prediction sequence; Among them, the original feature variables ensure the interpretability and stability of the prediction model in the resource recycling business; the binary feature variables improve the generalization and stability of the prediction model in the resource recycling business.
5. An electronic device comprising: processor; as well as A memory storing computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 1-3.
6. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
A method of prediction model based on random forest algorithm
AU2020100709A4
Multi-feature fusion extraction method in field of financial risk control
CN107423871A