Label generation method and device for risk portrait construction
By dividing and screening the features and generating predictive features in combination with the LightGBM model, the problem of difficulty in capturing complex risk characteristics in the existing technology is solved, and the fine-grained risk hierarchy division and multi-dimensional risk state expression are achieved, which improves the accuracy of risk portraits.
Patent Information
- Application Number
- CN202411696230.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-25
AI Technical Summary
Existing risk label generation methods are difficult to capture nonlinear features when dealing with complex risk scenarios, and over-reliance on expert experience leads to insufficient timeliness and complex risk mining capabilities.
By dividing the features into sub-feature sets, the importance value, correlation value and feature filtering amount are calculated, the key features are selected, and predictive features are generated using the LightGBM model. Finally, the model feature set is constructed and the woe value is calculated to generate the risk of fine-grainedness. Label.
It improves the accuracy of risk portraits, can better express the subject's multi-dimensional risk state, realizes fine-grained risk hierarchy division, and enhances the ability to mine complex risks.
Smart Images

Figure CN119476956A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of risk profiling, and specifically relates to a label generation method and device for risk profiling construction. Background Art
[0002] Risk profiling is used in many fields, and the key to the accuracy of risk profiling lies in whether the risk label can reflect the risk status of the subject under a certain dimension. The existing risk label generation method is mainly based on rule-driven. The rules are set based on the experience and risk definition of domain experts, and the logic or conditions are pre-set based on the rules to generate risk labels. Rules can be set according to a variety of standards. For example, in the financial field, transaction frequency, consumption amount, abnormal account login behavior, etc. can be used as standards. The rule is set as "If a user fails to log in more than 5 times within 24 hours, it is marked as a 'frequent failed transaction account'". The rule-based label generation method has the advantages of strong interpretability and low implementation cost, but it is often linear and static. When the risk shows nonlinear characteristics or multivariate dependence, it is difficult to capture complex risk characteristics, so the ability to characterize complex risk scenarios is insufficient. In addition, the rule-based method relies too much on expert experience, resulting in insufficient timeliness of the rules and complex risk mining capabilities.
[0003] In addition to rule-driven methods, some existing technologies use statistical methods or simple machine learning models to classify or score the risks of the subject and then generate risk labels. For example, individual risks are preliminarily assessed through methods such as logistic regression and decision trees. This type of method can handle nonlinear relationships, can be used for multidimensional data and large-scale samples, and has a certain degree of versatility. However, there are also the following shortcomings: 1) Limited generalization ability of model labels: The current mainstream model label generation method cannot fully capture complex risk feature patterns and is easily affected by indicators of a single dimension, resulting in the generated labels being unable to effectively cope with changing environments. This single risk label system is difficult to flexibly cope with the risk differences of different subjects and different periods. 2) Lack of segmentation for different risk levels: In traditional risk profiling methods, risk labels are mostly single scores or classifications, lacking fine-grained risk level division. Many scoring models lack label level division, which limits the refinement of risk identification and cannot meet the needs of refined risk control. 3) Lack of standardized support for model label generation methods: At present, in the process of generating risk profiles, there is a lack of unified standards and methods for label generation for different subjects, resulting in poor repeatability and interpretability of label generation. Most existing risk assessment methods are based on data-specific processing and are unable to generalize label generation models across subjects, which affects their wide application. Summary of the invention
[0004] The present invention is made to solve the above-mentioned problems, and its purpose is to provide a label generation method and device for risk profile construction.
[0005] The present invention provides a label generation method for risk profile construction, which is used to generate label results related to risk profiles corresponding to each target based on risk-related data, wherein the risk-related data includes values of multiple different features corresponding to each target, and a risk judgment label corresponding to each target, and has such characteristics, including the following steps: step S1, dividing all features into multiple categories, generating sub-feature sets corresponding to each category, the sub-feature sets including at least one feature and all values corresponding to the feature; step S2, for each sub-feature set, according to the number of features in the sub-feature set and the values corresponding to the features, calculating the importance value and correlation value of each feature and the feature screening amount; step S3, for each sub-feature set, according to the importance value, correlation value and feature screening amount, selecting features from the sub-feature set to construct a corresponding screening feature set Combine; Step S4, for each sub-feature set, input the values of all features corresponding to each target in the sub-feature set into the machine learning model, and combine the risk judgment label corresponding to the target to obtain the predicted value corresponding to each target in the sub-feature set as the value of the predicted feature corresponding to the target in the sub-feature set; Step S5, for each sub-feature set, merge the features of the corresponding screening feature set and the prediction features to obtain the corresponding model feature set; Step S6, for each model feature set, perform binning calculation to obtain the binned value of each feature corresponding to each target in the model feature set, and calculate the woe value of each feature corresponding to each target in the model feature set according to all the binning values and risk judgment labels corresponding to the model feature set, wherein the label result of the target is each feature of the target in each model feature set and its corresponding woe value.
[0006] In the label generation method for risk profile construction provided by the present invention, there may also be such a feature: wherein, in step S4, the predicted value is obtained by the LightGBM model, and its calculation expression is: In the formula is the predicted value corresponding to target k in sub-feature set j, is a sample consisting of the values of all features corresponding to target k in sub-feature set j, is the t-th tree pair sample of the LightGBM model The prediction results, η is the learning rate, T is the total number of trees in the LightGBM model, and σ is the Sigmoid function.
[0007] The label generation method for risk profile construction provided by the present invention may also have the following characteristics: wherein, in step S2, the calculation expression of the correlation value is: In the formula is the correlation value of feature i in sub-feature set j, is the value of feature i corresponding to the kth target in sub-feature set j, is the mean of feature i in sub-feature set j, y k is the risk judgment label corresponding to the k-th target, is the mean of the risk judgment labels of all targets, and n is the total number of targets.
[0008] In the label generation method for risk profile construction provided by the present invention, it can also have the following characteristics: wherein, in step S2, according to the information gain of the feature on the node of the tree of the LightGBM model, the corresponding importance value is calculated, and the calculation expression of the importance value is: In the formula is the importance value of feature i in sub-feature set j, p is the total number of features in sub-feature set j, M is the total number of trees in the LightGBM model, N m is the set of nodes of the mth tree, is the indicator function, ΔL m,n is the information gain of feature i on node n of the mth tree. When node n is split using feature i, When node n does not use feature i for splitting,
[0009] The label generation method for risk profile construction provided by the present invention may also have the following characteristics: wherein, in step S2, the calculation expression of the feature screening amount is: Where select_len j is the feature screening amount corresponding to sub-feature set j, p is the total number of features in sub-feature set j, This is a round-down operation.
[0010] The label generation method for risk profile construction provided by the present invention may also have the following features: wherein, in step S3, the calculation expression for screening the feature set is: X j,selected =X j,corr ∪X j,lgbm , where X j,selected is the screening feature set corresponding to the sub-feature set j, X j,corr The correlation filter feature set corresponding to the sub-feature set j, X j ,lgbmFor the importance screening feature set corresponding to the sub-feature set j, all features of the sub-feature set j are sorted from large to small according to the correlation value, and the features of the number of feature screening amounts are selected from the beginning of the sequence to construct the correlation screening feature set. All features of the sub-feature set j are sorted from large to small according to the importance value, and the features of the number of feature screening amounts are selected from the beginning of the sequence to construct the importance screening feature set.
[0011] In the label generation method for risk profile construction provided by the present invention, it can also have the following characteristics: wherein, step S6 includes the following sub-steps: step S6-1, for the model feature set, generate multiple candidate splitting thresholds, and calculate the splitting values corresponding to each candidate splitting threshold; step S6-2, take the candidate splitting threshold corresponding to the largest splitting value as the optimal splitting point; step S6-3, repeat steps S6-1 to S6-2 until the number of optimal splitting points reaches a preset value; step S6-4, calculate the bin boundaries based on all optimal splitting points; step S6-5, based on the bin boundaries, calculate the bins value and bin0 value of each feature corresponding to each target in the model feature set as the bin value; step S6-6, calculate the woe value of each feature corresponding to each target in the model feature set based on all bin values.
[0012] In the label generation method for risk profile construction provided by the present invention, there may also be such a feature: wherein the calculation expression of the split value is: H(D j )=-Σ C∈C p(c)log2p(c), In the formula, IG(D j ,θ) is the sub-feature set D j The corresponding split value of the candidate split threshold θ, |D| is the number of samples in D, is the sub-feature set D j The value of feature i corresponding to target k, v k is the target k, y k is the risk judgment label corresponding to target k, C is the sub-feature set D j The total number of features in D, p(c) is the number of features c in the sub-feature set D j The probability of the bin boundary is calculated as: In the formula for The set of bin boundary values, To sort all optimal split points in ascending order, the calculation expressions for bins value and bin0 value are: In the formula is the sub-feature set D j The value of feature i corresponding to target k in , for The left boundary value of the u-th binning interval.
[0013] In the label generation method for risk profile construction provided by the present invention, it can also have the following characteristics: wherein, in step S6-6, according to the bin0 value of the feature corresponding to the target, the values of the features corresponding to all targets are divided into multiple groups, the values of the features corresponding to all targets in the group have the same bin0 value, the risk judgment label is a binary label, and the calculation expression of the woe value is: In the formula For target k in sub-feature set D j The woe value of feature i corresponding to N bad For target k in sub-feature set D j The total number of risk judgment labels whose labels are bad categories in the group where the corresponding feature i value belongs, N good For target k in sub-feature set D j The total number of risk judgment labels corresponding to all values in the group where the corresponding feature i value belongs to the good category, N total For target k in sub-feature set D j The total number of values of feature i corresponding to .
[0014] The present invention also provides a label generation device for risk profile construction, which is used to generate label results related to risk profiles corresponding to each target based on risk-related data, wherein the risk-related data includes values of multiple different features corresponding to each target, and risk judgment labels corresponding to each target, and has the following characteristics, including: a subset division module, which divides all features into multiple categories, and generates sub-feature sets corresponding to each category, wherein the sub-feature sets include at least one feature and all values corresponding to the feature; a screening module, which calculates the importance value and correlation value of each feature and the feature screening amount according to the number of features in the sub-feature set and the values corresponding to the features; a screening set generation module, which selects features from the sub-feature set according to the importance value, correlation value and feature screening amount for each sub-feature set, and constructs a corresponding screening feature set; The prediction feature generation module inputs the values of all features corresponding to each target in the sub-feature set into the machine learning model for each sub-feature set, and combines the risk judgment label corresponding to the target to obtain the prediction value corresponding to each target in the sub-feature set as the value of the prediction feature corresponding to the target in the sub-feature set; the collection module merges the features and prediction features of the corresponding screening feature set for each sub-feature set to obtain the corresponding model feature set; the woe calculation module performs binning calculation on each model feature set to obtain the binning value of each feature corresponding to each target in the model feature set, and calculates the woe value of each feature corresponding to each target in the model feature set based on all the binning values and risk judgment labels corresponding to the model feature set, wherein the label result of the target is each feature of the target in each model feature set and its corresponding woe value.
[0015] Functions and Effects of the Invention
[0016] According to the label generation method and device for risk profile construction involved in the present invention, by dividing the features into sub-feature sets, and calculating the corresponding importance values and correlation values and feature screening amounts, multiple features are screened from each sub-feature set, and then the prediction features are calculated to generate the corresponding model feature set, and the woe value of each target is calculated for the features in each model feature set, thereby obtaining the label result. Therefore, the label generation method and device for risk profile construction of the present invention can generate multiple labels and corresponding label values for each target to improve the accuracy of risk profiles. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a block diagram of a label generation device for risk profile construction in an embodiment of the present invention;
[0018] Figure 2 It is a schematic diagram of a process of generating a woe value by a woe calculation module in an embodiment of the present invention;
[0019] Figure 3 is a flow chart of a label generation method for risk profile construction in an embodiment of the present invention;
[0020] Figure 4 is a radar schematic diagram of a high-risk user portrait in an embodiment of the present invention;
[0021] Figure 5 is a radar schematic diagram of a low-risk user portrait in an embodiment of the present invention;
[0022] Figure 6 Schematic diagram of visualizing a scorecard in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the following embodiments and the accompanying drawings specifically illustrate the label generation method and device for risk profile construction of the present invention.
[0024] This embodiment provides a label generation device for risk profile construction, which is used to generate label results related to risk profiles for each target according to risk-related data. The risk-related data includes the values of multiple different features corresponding to each target, and the risk judgment label corresponding to each target. The risk judgment label is a binary classification label.
[0025] In this embodiment, the label generation device for risk profile construction is applied to the financial field, and the risk-related data is financial transaction data D = [VXY]. Where V = {v1, ..., v n} represents a set of trading accounts, each trading account is a target, for each v i ∈V has a binary label whether it is illegal, that is, the line judgment label y i ∈Y, n is the number of trading accounts, and the feature space constructed from the perspectives of statistical calculation, complex rules, expert knowledge, and intelligent algorithms is X, where X = {X1, X2, …, X d}, X i ={ i,k |k=1,2,…,n}, represents the feature χ i The feature set of i,k Indicates the feature χ corresponding to the kth trading account i In other embodiments, the label generation device for risk profile construction can be applied to other fields, such as food safety, where the target is a specified food, and the risk-related data is production data related to the specified food, such as the manufacturer.
[0026] Figure 1It is a block diagram of a label generation device for risk profile construction in an embodiment of the present invention.
[0027] like Figure 1 As shown, the label generation device 100 for constructing a risk profile includes a subset division module 11, a screening module 12, a screening set generation module 13, a prediction feature generation module 14, a collection module 15, a woe calculation module 16 and a control module 17 for controlling the operation of the above modules.
[0028] The subset division module 11 is used to divide all features into multiple categories and generate a sub-feature set corresponding to each category. The sub-feature set includes at least one feature and all values corresponding to the feature.
[0029] In this embodiment, the subset division module 11 divides the information into m categories, that is, obtains the sub-feature set X 1 ,X 2 ,…,X m , and satisfies
[0030] The screening module 12 is used to calculate the importance value and the correlation value of each feature and the feature screening amount for each sub-feature set according to the number of features in the sub-feature set and the values corresponding to the features.
[0031] The calculation expression of the correlation value is:
[0032]
[0033] In the formula is the correlation value of feature i in sub-feature set j, is the value of feature i corresponding to the kth target in sub-feature set j, is the mean of feature i in sub-feature set j, y k is the risk judgment label corresponding to the k-th target, is the mean of the risk judgment labels of all targets, and n is the total number of targets.
[0034] Among them, the screening module 12 calculates the corresponding importance value according to the information gain of the feature on the node of the tree of the LightGBM model. The calculation expression of the importance value is:
[0035]
[0036] In the formula is the importance value of feature i in sub-feature set j, p is the total number of features in sub-feature set j, M is the total number of trees in the LightGBM model, N m is the set of nodes of the mth tree, is the indicator function, ΔLm,n is the loss reduction when feature i is used as the splitting loss at node n of the mth tree, i.e., information gain. When node n is split using feature i, When node n does not use feature i for splitting,
[0037] The loss function corresponding to the LightGBM model in this embodiment is the binary cross entropy loss L, and its calculation expression is:
[0038]
[0039] Where N is the total number of samples, y i is the risk judgment label of the i-th sample, is the predicted probability of the LightGBM model for the i-th sample.
[0040] Among them, the calculation expression of the feature screening amount is:
[0041]
[0042] Where select_len j is the feature screening amount corresponding to sub-feature set j, p is the total number of features in sub-feature set j, This is a round-down operation.
[0043] The screening set generation module 13 is used to select features from the sub-feature sets according to the importance value, the relevance value and the feature screening amount for each sub-feature set, and construct a corresponding screening feature set.
[0044] Among them, the calculation expression for filtering feature sets is:
[0045] X j,selected =X j,corr ∪X j,lgbm ,
[0046] Where X j,selected is the screening feature set corresponding to the sub-feature set j, X j,corr The correlation filter feature set corresponding to the sub-feature set j, X j,lgbm Filter the feature set corresponding to the importance of sub-feature set j.
[0047] Sort all the features of sub-feature set j from large to small according to the correlation value, select the number of features of feature screening from the beginning of the sequence, and construct a correlation screening feature set. Correlation screening feature set X j,corr The calculation expression is:
[0048] X j,corr =argsort(|correlationsj |)[:select_len j ],
[0049]
[0050] In the formula, argsort(|correlatons j |) is to sort the correlation values of the sub-feature set j in descending order according to the absolute value, that is, in this embodiment, the correlation values are sorted according to their absolute values, [:select_len j ] is the feature screening amount corresponding to the sub-feature set j.
[0051] Sort all the features of sub-feature set j from large to small according to their importance values, select the number of features of feature screening quantity from the beginning of the sequence, and construct an importance screening feature set. Importance screening feature set X j,lgbm The calculation expression is:
[0052] X j,lgbm =argsort(|lgbm_importance j |)[:select_len j ],
[0053]
[0054] In the formula, argsort(|lgbm_importance j |) is to sort the importance values of sub-feature set j in descending order according to their absolute values.
[0055] The prediction feature generation module 14 is used to input the values of all features corresponding to each target in the sub-feature set into the machine learning model for each sub-feature set, and combine the risk judgment label corresponding to the target to obtain the prediction value corresponding to each target in the sub-feature set as the value of the prediction feature corresponding to the target in the sub-feature set. In this embodiment, the risk judgment label is used as the target variable, i.e., the label, of the machine learning model.
[0056] Among them, the machine learning model is the LightGBM model, and the prediction feature generation module 14 obtains the prediction value through the LightGBM model, and its calculation expression is:
[0057]
[0058] In the formula is the predicted value corresponding to target k in sub-feature set j, is a sample consisting of the values of all features corresponding to target k in sub-feature set j, is the t-th tree pair sample of the LightGBM model The prediction results are divided based on the decision tree structure, and finally mapped to the value of a leaf node. η is the learning rate, which is used to scale the output of each tree. T is the total number of trees in the LightGBM model. σ is the Sigmoid function, which is used to convert the output into a probability value:
[0059] The collection module 15 is used to combine the features of the corresponding screening feature set and the prediction features for each sub-feature set to obtain a corresponding model feature set.
[0060] The calculation expression of the model feature set in this embodiment is:
[0061]
[0062] In the formula is the model feature set corresponding to the sub-feature set j, and || is the concatenation operation. For example, to filter the feature set X j,selected There are 4 categories of features in , then the model feature set There are 5 categories of features, that is, the screening feature set X j,selected Features of the four categories and predicted features.
[0063] The woe calculation module 16 is used to perform bin calculations on each model feature set to obtain the bin values of each feature corresponding to each target in the model feature set, and calculate the woe values of each feature corresponding to each target in the model feature set based on all the bin values and risk judgment labels corresponding to the model feature set. Among them, the label result of the target is the various features of the target in each model feature set and its corresponding woe value.
[0064] Figure 2 It is a schematic diagram of the process of generating a woe value by a woe calculation module in an embodiment of the present invention.
[0065] like Figure 2 As shown, the process of generating the woe value by the woe calculation module 16 includes the following steps:
[0066] Step S6-1: Generate multiple candidate split thresholds for the model feature set, and calculate the split value corresponding to each candidate split threshold. In this embodiment, the candidate split threshold is obtained by the average value of the sorted adjacent samples.
[0067] The calculation expression of the split value is:
[0068]
[0069] H(D j )=-Σc∈C p(c)log2p(c),
[0070]
[0071] In the formula, IG(D j ,θ) is the sub-feature set D j The corresponding split value of the candidate split threshold θ, |D| is the number of samples in D, and a sample includes the values of all features corresponding to a target in the set D, is the sub-feature set D j The value of feature i corresponding to target k, v k is the target k, y k is the risk judgment label corresponding to target k, C is the sub-feature set D j The total number of features in D, p(c) is the number of features c in the sub-feature set D j probability.
[0072] Step S6-2: taking the candidate splitting threshold corresponding to the maximum splitting value as the optimal splitting point.
[0073] Step S6-3, repeating steps S6-1 to S6-2 until the number of optimal splitting points reaches a preset value. In this embodiment, iterating two layers generates at most four optimal splitting points.
[0074] Step S6-4, calculating the bin boundaries based on all the optimal splitting points.
[0075] The calculation expression of the bin boundary is:
[0076]
[0077] In the formula for The set of bin boundary values, To sort all the optimal splitting points in ascending order. In this embodiment, negative infinity -∞ and positive infinity ∞ are used to ensure that the final binning boundary allows all values to be covered.
[0078] Step S6-5, according to the binning boundaries, calculate the bins value and bin0 value of each feature corresponding to each target in the model feature set as the binning value.
[0079] Among them, the calculation expressions of bins value and bin0 value are:
[0080]
[0081] In the formula is the sub-feature set D j The value of feature i corresponding to target k in , for The left boundary value of the u-th binning interval.
[0082] Step S6-6, based on all bin values, calculate the woe value of each feature corresponding to each target in the model feature set.
[0083] Among them, according to the bin0 value of the feature corresponding to the target, the values of the features corresponding to all targets are divided into multiple groups The values of the features corresponding to all targets in the group have the same bin0 value, that is, if The target corresponding feature
[0084] The calculation expression of woe value is:
[0085]
[0086] In the formula For target k in sub-feature set D j The woe value of feature i corresponding to N bad For target k in sub-feature set D j The total number of risk judgment labels whose labels are bad categories in the group where the corresponding feature i value belongs, N good For target k in sub-feature set D j The total number of risk judgment labels whose labels are good categories in the group where the corresponding feature i value belongs, N total For target k in sub-feature set D j The total number of values of the corresponding feature j in . In this embodiment, the risk judgment label is 0 or 1, 0 represents a good category, and 1 represents a bad category. In other embodiments, other forms can be used to replace 0 and 1 to distinguish between good and bad categories.
[0087] The control module 17 stores a control program for controlling the operation of each module.
[0088] The following describes the process of using the label generation device 100 for risk profile construction to perform a label generation method for risk profile construction in conjunction with the accompanying drawings.
[0089] Figure 3 It is a flowchart of a label generation method for risk profile construction in an embodiment of the present invention.
[0090] like Figure 3 As shown, the label generation method for risk profile construction includes the following steps:
[0091] Step S1: using the subset division module 11 to divide all features into multiple categories, generating a sub-feature set corresponding to each category, wherein the sub-feature set includes at least one feature and all values corresponding to the feature.
[0092] Step S2: Using the screening module 12 to calculate the importance value and correlation value of each feature and the feature screening amount for each sub-feature set according to the number of features in the sub-feature set and the values corresponding to the features.
[0093] Step S3, using the screening set generation module 13 to select features from the sub-feature sets according to the importance value, the relevance value and the feature screening amount for each sub-feature set, and construct a corresponding screening feature set.
[0094] Step S4, using the prediction feature generation module 14 for each sub-feature set, inputs the values of all features corresponding to each target in the sub-feature set into the machine learning model, combines the risk judgment label corresponding to the target, and obtains the prediction value corresponding to each target in the sub-feature set as the value of the prediction feature corresponding to the target in the sub-feature set.
[0095] Step S5, using the collection module 15 to combine the features of the corresponding screening feature set and the prediction features for each sub-feature set to obtain a corresponding model feature set.
[0096] Step S6, use the woe calculation module 16 to perform bin calculations on each model feature set to obtain the bin values of each feature corresponding to each target in the model feature set, and calculate the woe value of each feature corresponding to each target in the model feature set based on all the bin values and risk judgment labels corresponding to the model feature set.
[0097] In this embodiment, a radar chart of the user portrait of the target can be constructed based on the label results of the target.
[0098] Figure 4 It is a radar schematic diagram of a high-risk user portrait in an embodiment of the present invention.
[0099] Figure 5 It is a radar schematic diagram of a low-risk user portrait in an embodiment of the present invention.
[0100] like Figure 4 and Figure 5As shown in the figure, the label result contains 8 features and their corresponding values, namely m_woe_1, m_woe_2, m_woe_3, m_woe_4, m_woe_5, m_woe_6, m_woe_7 and m_woe_8. It can be seen that the area occupied by abnormal subjects, i.e. high-risk users, is large, while the area occupied by normal subjects, i.e. low-risk users, is small, which can intuitively show that the label result accurately depicts the multi-dimensional risk level of the subject risk.
[0101] In this embodiment, the label generation method used to construct the risk profile generates the label result, that is, the model label X m_woe , with general statistics optimization label X anno Conduct a comparative experiment on the scorecard model. The general statistical optimization label X anno For a financial institution, the internal expert rule-driven label is constructed to build a scoring model SCM based on logistic regression using the model label X m_woe and general statistics optimization tag X anno The training data set is used for training, and the trained models are used for binary classification prediction. The specific indicator results are shown in the following table:
[0102] KS AUC <![CDATA[f10]]> <![CDATA[Recall1]]> <![CDATA[f11]]> <![CDATA[SCM+X anno ]]> 0.7454 0.9533 0.9657 0.5707 0.6782 <![CDATA[SCM+X m_woe ]]> 0.7744 0.9614 0.9692 0.6272 0.7210
[0103] The first column in the table above shows the models trained with different training sets, and the second to sixth columns show the KS index, AUC index, f10 index, Recall1 index, and f11 index of the models. For example, the cell in the second row and second column indicates that the general statistical optimization label X anno The KS index of the scoring model SCM trained by the constructed training set is 0.7454. It can be seen that in the model label X m_woe The classification ability of the scoring model SCM is further improved under the data representation of m_woe The anomaly detection effect of the scoring model SCM is enhanced.
[0104] In this embodiment, based on the scoring model SCM, the characteristic coefficients and intercepts are extracted, the benchmark score and the score PDO for each doubling of the odds are set, and the factor weights and offsets are calculated at the same time to create a score card containing the characteristics, coefficients, and sample scores and predicted probabilities. The scores are divided into several equidistant scoring intervals, and the number and proportion of positive and negative samples in each scoring interval are calculated to intuitively reflect the distribution of positive and negative samples in each scoring interval.
[0105] Figure 6 Schematic diagram of visualizing a scorecard in an embodiment of the present invention.
[0106] like Figure 6As shown in the figure, the horizontal axis is the sample score interval value score_bins, the vertical axis of the histogram is the number of samples in the score interval Count, and the vertical axis of the line graph is the bad sample ratio Bad Rate in the score interval. m_woe The scorecard intuitively shows how each module distinguishes between positive and abnormal entities, achieving a strong correlation between abnormal entities and risk scores.
[0107] In this embodiment, some key model labels are selected, grouped using bin values, and the number and proportion of bad samples are calculated within the group. The results are shown in the following table:
[0108]
[0109] The first column in the table above is the different model labels χ m_woe1 , χ lm_woe2 and χ m_woe3 The second to sixth columns are woe value, bin range, number of samples in bad category, total number of samples and proportion of samples in bad category. It can be seen that in the given example key model label grouping, the proportion of bad samples is more than 90%, showing that the model label X m_woe Accurate representation of bad samples in a specific dimension.
[0110] Functions and Effects of the Embodiments
[0111] According to the label generation method and device for risk portrait construction involved in this embodiment, by dividing the features into sub-feature sets, and calculating the corresponding importance values and correlation values and feature screening amounts, multiple features are screened from each sub-feature set, and then the prediction features are calculated to generate the corresponding model feature set, and the woe value of each target is calculated for the features in each model feature set, so as to obtain the label result. In short, this method can effectively characterize nonlinear and multivariate relationships, better express the multidimensional risk status of the subject, realize fine-grained risk level division, improve the accuracy of risk portraits, and enhance the ability to mine complex risks.
[0112] Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A label generation method for risk profile construction, used to generate label results related to risk profiles corresponding to each target based on risk-related data, wherein the risk-related data includes values of multiple different features corresponding to each target and risk judgment labels corresponding to each target, characterized in that: The following steps are involved: Step S1, dividing all the features into multiple categories, generating a sub-feature set corresponding to each category, wherein the sub-feature set includes at least one feature and all the values corresponding to the feature; Step S2, for each of the sub-feature sets, according to the number of the features in the sub-feature set and the values corresponding to the features, calculate the importance value and the correlation value of each of the features and the feature screening amount; Step S3, for each of the sub-feature sets, according to the importance value, the relevance value and the feature screening amount, selecting the feature from the sub-feature set to construct a corresponding screening feature set; Step S4, for each of the sub-feature sets, input the values of all the features corresponding to each of the targets in the sub-feature set into a machine learning model, and combine the risk judgment label corresponding to the target to obtain the predicted value corresponding to each of the targets in the sub-feature set as the value of the predicted feature corresponding to the target in the sub-feature set; Step S5, for each of the sub-feature sets, merging the features of the corresponding screening feature set and the prediction features to obtain a corresponding model feature set; Step S6, performing binning calculation on each of the model feature sets to obtain the binning values of each of the features corresponding to each of the targets in the model feature set, and calculating the woe values of each of the features corresponding to each of the targets in the model feature set based on all of the binning values corresponding to the model feature set and the risk judgment label, Among them, the label result of the target is each of the features of the target in each of the model feature sets and its corresponding woe value.
2. The label generation method for risk profile construction according to claim 1, characterized in that: in, In step S4, the predicted value is obtained by the LightGBM model, and its calculation expression is: In the formula is the predicted value corresponding to the target K in the sub-feature set j, is a sample consisting of the values of all features corresponding to target k in sub-feature set j, is the t-th tree pair sample of the LightGBM model The prediction results, η is the learning rate, T is the total number of trees in the LightGBM model, and σ is the Sigmoid function.
3. The label generation method for risk profile construction according to claim 1, characterized in that: in, In step S2, the calculation expression of the correlation value is: In the formula is the correlation value of feature i in sub-feature set j, is the value of feature i corresponding to the kth target in sub-feature set j, is the mean of feature i in sub-feature set j, y k is the risk judgment label corresponding to the k-th target, is the mean of the risk judgment labels of all targets, and n is the total number of targets.
4. The label generation method for risk profile construction according to claim 1, characterized in that: in, In step S2, the corresponding importance value is calculated according to the information gain of the feature on the node of the tree of the LightGBM model. The calculation expression of the importance value is: In the formula is the importance value of feature i in sub-feature set j, p is the total number of features in sub-feature set j, M is the total number of trees in the LightGBM model, N m is the set of nodes of the mth tree, is the indicator function, ΔL m,n is the information gain of feature i at node n of the mth tree, When node n is split using feature i, When node n does not use feature i for splitting, 5. The label generation method for risk profile construction according to claim 1, characterized in that: in, In step S2, the calculation expression of the characteristic screening amount is: Where select_len j is the feature screening amount corresponding to sub-feature set j, p is the total number of features in sub-feature set j, This is a round-down operation.
6. The label generation method for risk profile construction according to claim 1, characterized in that: in, In step S3, the calculation expression of the screening feature set is: X j,selected =X j,corr ∪X j,lgbm , Where X j,selected is the screening feature set corresponding to the sub-feature set j, X j,corr The correlation filter feature set corresponding to the sub-feature set j, X j,lgbm Filter the feature set corresponding to the importance of sub-feature set j, All the features of sub-feature set j are sorted from large to small according to the correlation value, and the features of the number of feature screening quantities are selected from the beginning of the sequence to construct the correlation screening feature set, All the features of sub-feature set j are sorted from large to small according to the importance values, and the features of the number of feature screening quantities are selected from the beginning of the sequence to construct the importance screening feature set.
7. The label generation method for risk profile construction according to claim 1, Features: Wherein, the step S6 includes the following sub-steps: Step S6-1, generating multiple candidate splitting thresholds for the model feature set, and calculating the splitting value corresponding to each of the candidate splitting thresholds; Step S6-2, taking the candidate splitting threshold corresponding to the maximum splitting value as the optimal splitting point; Step S6-3, repeatedly executing steps S6-1 to S6-2 until the number of the optimal splitting points reaches a preset value; Step S6-4, calculating the bin boundaries according to all the optimal splitting points; Step S6-5, according to the binning boundary, calculating the bins value and bin0 value of each of the features corresponding to each of the targets in the model feature set as the binning value; Step S6-6, based on all the bin values, calculate the woe value of each of the features corresponding to each of the targets in the model feature set.
8. The label generation method for risk profile construction according to claim 7, characterized in that: in, The calculation expression of the split value is: H(D j )=-Σ C∈C p(c)log2p(c), In the formula, IG(D j ,θ) is the sub-feature set D j The corresponding split value of the candidate split threshold θ, |D| is the number of samples in D, is the sub-feature set D j The value of feature i corresponding to target k, v k is the target k, y k is the risk judgment label corresponding to target k, C is the sub-feature set D k The total number of features in D, p(c) is the number of features c in the sub-feature set D j The probability of The calculation expression of the bin boundary is: In the formula for The set of bin boundary values, To sort all optimal splitting points in ascending order, The calculation expressions of the bins value and the bin0 value are: In the formula is the sub-feature set D k The value of feature i corresponding to target k in , for The left boundary value of the u-th binning interval.
9. The label generation method for risk profile construction according to claim 7, characterized in that: in, In step S6-6, according to the bin0 value of the feature corresponding to the target, the values of the feature corresponding to all the targets are divided into multiple groups, The values of the features corresponding to all the targets in the group have the same bin0 value, The risk judgment label is a binary classification label. The calculation expression of the woe value is: In the formula For target k in sub-feature set D k The woe value of feature i corresponding to N bad For target k in sub-feature set D j The total number of risk judgment labels whose labels are bad categories in the group where the corresponding feature i value belongs, N good For target k in sub-feature set D j The total number of risk judgment labels corresponding to all values in the group where the corresponding feature i value belongs to the good category, N total For target k in sub-feature set D j The total number of values of feature i corresponding to .
10. A label generation device for risk profile construction, used to generate label results related to risk profiles corresponding to each target based on risk-related data, wherein the risk-related data includes values of multiple different features corresponding to each target and risk judgment labels corresponding to each target, characterized in that: include: A subset division module divides all the features into multiple categories and generates a sub-feature set corresponding to each category, wherein the sub-feature set includes at least one feature and all the values corresponding to the feature; A screening module, for each of the sub-feature sets, calculates the importance value and the relevance value of each of the features and the feature screening amount according to the number of the features in the sub-feature set and the values corresponding to the features; A screening set generating module, for each of the sub-feature sets, selecting the feature from the sub-feature sets according to the importance value, the relevance value and the feature screening amount, to construct a corresponding screening feature set; A prediction feature generation module, for each of the sub-feature sets, inputs the values of all the features corresponding to each of the targets in the sub-feature set into a machine learning model, and combines the risk judgment label corresponding to the target to obtain a prediction value corresponding to each of the targets in the sub-feature set as the value of the prediction feature corresponding to the target in the sub-feature set; A collection module, for each of the sub-feature sets, combines the features of the corresponding screening feature set with the prediction features to obtain a corresponding model feature set; The woe calculation module performs binning calculation on each of the model feature sets to obtain the binning values of each of the features corresponding to each of the targets in the model feature set, and calculates the woe values of each of the features corresponding to each of the targets in the model feature set based on all of the binning values corresponding to the model feature set and the risk judgment label. Among them, the label result of the target is each of the features of the target in each of the model feature sets and its corresponding woe value.
Citation Information
Patent Citations
Mountain forest fire early warning method applied to power transmission line
CN113762805A
Risk portrait establishment method based on artificial intelligence and related equipment
CN116805206A
Enterprise risk early warning method based on association analysis FP-tree algorithm
WO2022121083A1