Variable screening method and device, storage medium and electronic equipment

By selecting a set of variables that are consistent in direction and relevant to the business in the risk prediction model, the problem of inconsistent variable contribution direction with business logic in traditional models is solved, thereby improving the model's predictive ability and interpretability.

CN121883151APending Publication Date: 2026-04-17CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2025-12-30
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional risk prediction models fail to adequately consider the consistency between the direction of a variable's contribution in different samples and the business logic during variable selection, resulting in a decrease in the model's risk prediction capability.

Method used

By determining the contribution value of variables in the business dataset, dividing the variable range, calculating the contribution value ratio, and calculating the interaction and fit, a set of variables with consistent direction and business relevance is selected to build a risk prediction model.

Benefits of technology

It improves the accuracy and business logic rationality of risk prediction models, and enhances the interpretability and data support of the models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121883151A_ABST
    Figure CN121883151A_ABST
Patent Text Reader

Abstract

The invention discloses a variable screening method and device, a storage medium and electronic equipment, and the method comprises the steps: determining a variable contribution value corresponding to a plurality of variable combinations related to risk prediction in a business data set, the variable contribution value being a contribution value of a first variable to a risk prediction result corresponding to a second variable; extracting a plurality of first variables in the plurality of variable combinations, and dividing the plurality of first variables into a plurality of variable intervals according to a preset business range; counting a first proportion corresponding to a positive value variable contribution value and a second proportion corresponding to a negative value variable contribution value in the plurality of variable intervals, and determining a first variable set based on a size relationship between the first proportion and the second proportion; calculating the interaction degree between different variables in the first variable set and the integrating degree between the different variables and preset business logic, and screening the first variable set based on the interaction degree and the integrating degree to obtain a second variable set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial risk control, and more specifically, to a variable screening method, apparatus, storage medium, and electronic device. Background Technology

[0002] In the field of financial risk control technology, variable selection is a crucial task when constructing risk prediction models. However, the variable selection process in traditional models often focuses on the statistical significance and discriminative power of variables, such as using indicators like information value (IV) and Gini impurity reduction for initial screening. While these methods can identify the importance of variables to some extent, they neglect whether the direction of the variable's contribution in different sample groups aligns with business logic. This can lead to some variables contributing counterintuitively to risk prediction in specific samples, potentially causing severe prediction biases when the model faces diverse market environments and customer groups, thus significantly reducing the accuracy of the prediction results.

[0003] Therefore, in related technologies, the variable selection in traditional risk prediction models does not fully consider the consistency between the contribution direction of variables in different samples and business logic, resulting in a reduction in the risk prediction capability of the model, and no effective solution has yet been proposed. Summary of the Invention

[0004] This application provides a variable screening method, apparatus, storage medium, and electronic device to at least solve the technical problem in the related art that the variable screening in traditional risk prediction models does not fully consider the consistency between the contribution direction of variables in different samples and business logic, resulting in a reduction in the risk prediction capability of the model.

[0005] According to one embodiment of this application, a variable screening method is provided, comprising: determining variable contribution values ​​corresponding to multiple variable combinations related to risk prediction in a business dataset, each variable combination including: a first variable whose own changes are unaffected by changes in other variables, and a second variable affected by changes in the first variable, wherein the variable contribution value is the contribution value of the first variable to the risk prediction result corresponding to the second variable; extracting multiple first variables from the multiple variable combinations and dividing the multiple first variables into multiple variable intervals according to a preset business scope; calculating a first proportion corresponding to positive variable contribution values ​​and a second proportion corresponding to negative variable contribution values ​​in the multiple variable intervals, and determining a first variable set based on the relationship between the first proportion and the second proportion; calculating the interaction degree between different variables in the first variable set and the fit degree between the different variables and a preset business logic, and screening the first variable set based on the interaction degree and the fit degree to obtain a second variable set.

[0006] In one exemplary embodiment, determining the first set of variables based on the size relationship between the first proportion and the second proportion includes: when the size relationship indicates that the first proportion is greater than or equal to the second proportion, determining multiple variables corresponding to positive variable contribution values ​​as the first set of variables; when the size relationship indicates that the first proportion is less than the second proportion, determining multiple variables corresponding to negative variable contribution values ​​as the first set of variables.

[0007] In an exemplary embodiment, after determining the first set of variables based on the size relationship between the first proportion and the second proportion, the method further includes: combining any two different variables in the first set of variables to construct multiple sets of variable pairs, and determining the similarity between different variables in each set of variable pairs; obtaining multiple target variable pairs whose similarity is greater than or equal to a preset similarity threshold from among the multiple similarity values ​​corresponding to the multiple sets of variable pairs; and drawing an interaction relationship diagram of the first set of variables based on the multiple target variable pairs, wherein the interaction relationship diagram is used to show the interaction strength of different variables in the first set of variables.

[0008] In an exemplary embodiment, after filtering the first set of target variables based on interaction degree and fit degree to obtain the second set of target variables, the method further includes: determining the variable symbol corresponding to any variable in the second set of target variables appearing simultaneously in multiple variable intervals, thereby obtaining multiple variable symbols; if at least two of the multiple variable symbols are different from the other variable symbols, suspending the participation of the variables in the second set of target variables in the training of the target model, wherein the target model is a model trained and learned using a pre-defined business dataset; if all the variable symbols are the same, allowing the variables in the second set of target variables to participate in the training of the target model, and identifying a portion of the sample data corresponding to the variables in the second set of target variables as key training data.

[0009] In an exemplary embodiment, when at least two variable symbols differ from the other variable symbols among multiple variable symbols, after suspending the participation of variables in the second target variable set in the training of the target model, the method further includes: labeling all target variables in the second target variable set whose variable symbols change in different variable intervals to obtain labeling results; performing variable elimination processing on the second target variable set based on the labeling results to obtain a third target variable set; and using the third target variable set to replace the second target variable set to control the training of the target model.

[0010] In an exemplary embodiment, the interaction degree between different variables in the first variable set and the fit degree between different variables and preset business logic are calculated. Based on the interaction degree and the fit degree, the first variable set is filtered to obtain a second variable set. This includes: identifying multiple first variables in the first variable set whose interaction degree is greater than a preset interaction degree threshold, and determining a first subset of the first variables based on the identification results; identifying multiple first variables in the second variable set whose fit degree is greater than a preset fit threshold, and determining a second subset of the first variables based on the identification results; and summing the first variables in the first subset and the second subset to obtain the second variable set.

[0011] In an exemplary embodiment, before determining the variable contribution value corresponding to multiple variable combinations in the business dataset, the method further includes: preprocessing the business dataset, wherein the preprocessing includes at least one of the following: scaling the variable values ​​in the business dataset, imputing missing values ​​in the business dataset; dividing the preprocessed business dataset into a training set and a validation set according to a preset partitioning ratio; using the training set to perform preliminary iteration on the target model to obtain a first training model, and using the validation set to validate the first training model; and determining whether to update the business dataset based on the validation results.

[0012] According to another aspect of the embodiments of this application, a variable screening device is also provided, comprising: a first determining module, configured to determine the variable contribution values ​​corresponding to multiple variable combinations related to risk prediction in a business dataset, each variable combination comprising: a first variable whose own changes are not affected by changes in other variables, and a second variable affected by changes in the first variable, wherein the variable contribution value is the contribution value of the first variable to the risk prediction result corresponding to the second variable; an extraction module, configured to extract multiple first variables from the multiple variable combinations and divide the multiple first variables into multiple variable intervals according to a preset business scope; a statistics module, configured to count the first proportion corresponding to the positive variable contribution value and the second proportion corresponding to the negative variable contribution value in the multiple variable intervals, and determine a first variable set based on the size relationship between the first proportion and the second proportion; and a calculation module, configured to calculate the interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic, and filter the first variable set based on the interaction degree and the fit degree to obtain a second variable set.

[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described variable filtering method at runtime.

[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the variable filtering method described above through the computer program.

[0015] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program, wherein the above-described variable filtering method is executed by a processor.

[0016] In this embodiment, the variable contribution values ​​corresponding to multiple combinations of variables related to risk prediction in the business dataset are determined. Each variable combination includes: a first variable whose own changes are unaffected by changes in other variables, and a second variable affected by changes in the first variable. The variable contribution value is the contribution of the first variable to the risk prediction result corresponding to the second variable. Multiple first variables are extracted from the multiple variable combinations and divided into multiple variable intervals according to a preset business scope. The first proportion corresponding to positive variable contribution values ​​and the second proportion corresponding to negative variable contribution values ​​are statistically analyzed in the multiple variable intervals. A first variable set is determined based on the relationship between the first and second proportions. The interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic are calculated. Based on the interaction degree and the fit degree, the first variable set is filtered to obtain a second variable set. This technical solution solves the problem in traditional risk prediction models where variable filtering does not fully consider the consistency between the contribution direction of variables in different samples and the business logic, leading to a decrease in the model's risk prediction capability. Furthermore, by evaluating the stability of the contribution direction of variables in the business dataset to the risk prediction results and their fit with the business logic, and combining the interaction analysis between variables, a second set of variables with consistent direction and business relevance was selected, which effectively improved the accuracy of the risk prediction model. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the hardware environment for a variable filtering method according to an embodiment of this application;

[0020] Figure 2 This is a flowchart of a variable selection method according to an embodiment of this application;

[0021] Figure 3 This is a schematic flowchart of a variable selection method based on SHAP according to an embodiment of this application;

[0022] Figure 4 This is a flowchart of a directional consistency check according to an embodiment of this application;

[0023] Figure 5 This is a variable SHAP dependency graph (a) according to an embodiment of this application;

[0024] Figure 6 This is a variable SHAP dependency graph (II) according to an embodiment of this application;

[0025] Figure 7 This is a structural block diagram of a variable screening device according to an embodiment of this application. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, apparatus, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, apparatus, or devices.

[0028] According to one aspect of the embodiments of this application, a variable selection method is provided. This variable selection method is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligencehouse ecosystems. Optionally, in this embodiment, the above-mentioned variable selection method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. Figure 1 This is a schematic diagram of the hardware environment for a variable selection method according to an embodiment of this application, such as... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.

[0029] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.

[0030] This embodiment provides a variable filtering method, applied to the aforementioned terminal device. Figure 2 This is a flowchart of a variable selection method according to an embodiment of this application, which includes the following steps:

[0031] Step S202: Determine the variable contribution value corresponding to multiple variable combinations related to risk prediction in the business dataset. Each variable combination includes: a first variable that changes only itself and is not affected by changes in other variables, and a second variable that is affected by changes in the first variable. The variable contribution value is the contribution value of the first variable to the risk prediction result corresponding to the second variable.

[0032] Understandably, assuming a credit default prediction model is being built, the business dataset contains multiple variables such as customer basic information, financial status, and historical transaction records. After training the model using XGBoost (eXtreme Gradient Boosting), SHAP (SHapley Additive exPlanations) value analysis is used to deeply understand the impact of these variables on default prediction. An interaction may be found between "customer age" (the first variable) and "default status" (the second variable). To verify this, it is necessary to calculate the contribution of changes in "customer age" alone to the prediction of "default status." By analyzing the contributions of variable combinations, the non-linear impact of individual variables on the prediction results can be revealed.

[0033] Step S204: Extract multiple first variables from the multiple variable combinations, and divide the multiple first variables into multiple variable intervals according to a preset business scope;

[0034] In simple terms, a credit risk prediction model is analyzing the impact of "customer's monthly income" (the first variable) on default prediction. It is decided to divide "customer's monthly income" into five ranges: less than 5,000 yuan, 5,000-10,000 yuan, 10,000-20,000 yuan, 20,000-50,000 yuan, and greater than 50,000 yuan. For each range, the contribution of changes in customer's monthly income to the default prediction SHAP value is calculated. This example demonstrates that dividing variables into ranges can provide a deeper understanding of the specific impact of variables on model predictions.

[0035] Step S206: Calculate the first proportion corresponding to the contribution value of positive variables and the second proportion corresponding to the contribution value of negative variables in the multiple variable intervals, and determine the first variable set based on the size relationship between the first proportion and the second proportion;

[0036] Optionally, in the credit default prediction model, we continue to use "customer monthly income" as an example. After dividing "customer monthly income" into different intervals, we statistically analyze the proportion of positive and negative SHAP values ​​in each interval: In the interval where "customer monthly income" is less than 5,000 yuan, the results show that the first proportion of positive SHAP values ​​(indicating a positive contribution, i.e., increasing default risk) reaches 90%, while the second proportion of negative SHAP values ​​is only 10%. This means that among low-income customers, "customer monthly income" has a significant positive impact on default risk, and this effect is stable. Conversely, in the interval where "customer monthly income" is greater than 50,000 yuan, the first proportion is only 20%, while the second proportion is as high as 80%. This indicates that among high-income customers, "customer monthly income" mainly plays a role in reducing default risk, and this trend is stable in most samples. In the middle-income interval (between 5,000 and 50,000 yuan), the first and second proportions are relatively close. For example, in the 10,000-20,000 yuan interval, the first proportion is 55%, and the second proportion is 45%. This may indicate that the contribution of "customer monthly revenue" to default prediction is not very stable within this range, requiring further analysis or comprehensive consideration in conjunction with other characteristics. Based on the above statistical analysis, it was determined that the directional consistency of "customer monthly revenue" is extremely high in the low-income and high-income ranges, therefore it is prioritized for inclusion in the first variable set (here it is assumed that the difference between the first and second percentages must exceed 30% to meet the inclusion criteria). However, "customer monthly revenue" in the middle-income range, due to its poor directional consistency, may require additional validation or interaction analysis with other variables to determine its final inclusion in the model. This screening process not only identified variable ranges with stable directions and significant positive or negative contributions to the prediction results, but also potentially eliminated ranges with ambiguous directions and low contributions, optimizing the selection of model features and improving the model's applicability and explanatory power in the business domain.

[0037] Step S208: Calculate the interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic, and filter the first variable set based on the interaction degree and the fit degree to obtain the second variable set.

[0038] In simple terms, taking a credit card default prediction model as an example, calculating the interaction degree between different variables can reveal the additional contribution of certain variable combinations to default risk prediction. For example, if a significant interaction is found between "customer age" and "income level," younger customers, even with higher incomes, may have a higher default risk than expected. This is because younger customers may lack financial management experience and the ability to cope with unexpected events, a finding that has direct implications for business logic. Then, each variable is compared with the pre-set business logic to check if they align with common sense. For example, the business logic for the variable "income level" should be: "The higher the income, the lower the default risk." By observing whether the SHAP value corresponding to an increase in income level shows a significant negative trend through a SHAP dependency graph, we can verify whether the variable follows the business logic. Finally, the first set of variables is filtered based on interaction degree and fit to obtain the second set of variables. Finally, the risk prediction model is constructed using the second set of variables. Through this series of steps, not only is the predictive power of the model improved, but more importantly, the rationality and interpretability of the model's business logic are enhanced, providing more solid data support for bank risk management.

[0039] Through the above steps, the variable contribution values ​​corresponding to multiple variable combinations related to risk prediction in the business dataset are determined. Each variable combination includes: a first variable that changes only itself and is not affected by changes in other variables, and a second variable affected by changes in the first variable. The variable contribution value is the contribution value of the first variable to the risk prediction result corresponding to the second variable. Multiple first variables are extracted from the multiple variable combinations and divided into multiple variable intervals according to a preset business scope. The first proportion corresponding to positive variable contribution values ​​and the second proportion corresponding to negative variable contribution values ​​are statistically analyzed in the multiple variable intervals, and a first variable set is determined based on the relationship between the first and second proportions. The interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic are calculated, and the first variable set is filtered based on the interaction degree and the fit degree to obtain a second variable set. This technical solution solves the problem in traditional risk prediction models where variable filtering does not fully consider the consistency of the contribution direction of variables in different samples with the business logic, leading to a decrease in the model's risk prediction capability. Furthermore, by evaluating the stability of the contribution direction of variables in the business dataset to the risk prediction results and their fit with the business logic, and combining the interaction analysis between variables, a second set of variables with consistent direction and business relevance was selected, which effectively improved the accuracy of the risk prediction model.

[0040] In one exemplary embodiment, determining the first set of variables based on the size relationship between the first proportion and the second proportion includes: when the size relationship indicates that the first proportion is greater than or equal to the second proportion, determining multiple variables corresponding to positive variable contribution values ​​as the first set of variables; when the size relationship indicates that the first proportion is less than the second proportion, determining multiple variables corresponding to negative variable contribution values ​​as the first set of variables.

[0041] Optionally, taking a bank's credit card default prediction model as an example, assume that a set of candidate variables has been obtained through initial screening. These include "average monthly repayment amount," "recent credit inquiry frequency," and "employment status." To determine the first set of variables, the proportion of "average monthly repayment amount" that contributes positively (reduces default risk) across all samples (first proportion) and the proportion that contributes negatively (increases default risk) (second proportion) are calculated. If "average monthly repayment amount" reduces default risk in more than 80% of the samples, then its first proportion of positive contribution is greater than the second proportion, indicating that this variable is highly consistent with the business logic of reducing default risk. Similarly, for "recent credit inquiry frequency," the proportion that increases default risk (positive contribution) across all samples is calculated. If this proportion also exceeds 80%, then this variable will also be determined as part of the first set of variables. In contrast, "employment status," as a categorical variable, may have a different contribution direction depending on the specific category. If in most samples, "employment status" tends to reduce default risk when it falls into a certain category, but tends to increase default risk in a few samples, then the proportions for these two scenarios need to be calculated. If the proportion of reducing default risk reaches or exceeds a preset threshold, then that variable category will also be considered part of the first variable set. Finally, variables such as "average monthly repayment amount" and "recent credit inquiry frequency" that are consistent in direction and highly aligned with business logic will form the first variable set.

[0042] In summary, this screening mechanism based on directional consistency can not only identify variables that have a significant positive or negative impact on the model's predictive performance, but also ensure that these variables are consistent with the business logic, providing strong support for building more reliable and transparent predictive models.

[0043] In an exemplary embodiment, after determining the first set of variables based on the size relationship between the first proportion and the second proportion, the method further includes: combining any two different variables in the first set of variables to construct multiple sets of variable pairs, and determining the similarity between different variables in each set of variable pairs; obtaining multiple target variable pairs whose similarity is greater than or equal to a preset similarity threshold from among the multiple similarity values ​​corresponding to the multiple sets of variable pairs; and drawing an interaction relationship diagram of the first set of variables based on the multiple target variable pairs, wherein the interaction relationship diagram is used to show the interaction strength of different variables in the first set of variables.

[0044] Understandably, taking a credit card default prediction model as an example, assuming a first set of variables is determined through directional consistency analysis, including key variables such as "average monthly repayment amount," "recent credit inquiry frequency," and "full-time employment status," these variables are then paired to construct variable pairs, and their similarity is calculated. For example, for "average monthly repayment amount" and "recent credit inquiry frequency," the SHAP value is first used to analyze their respective marginal contributions to default prediction. Then, variable pairs are constructed, and by analyzing the distribution of their SHAP values, statistical measures such as the Pearson correlation coefficient are used to measure their linear correlation, serving as a quantitative indicator of similarity. If the absolute value of the correlation coefficient between "average monthly repayment amount" and "recent credit inquiry frequency" is greater than or equal to a preset threshold (e.g., 0.5), then the two variables constitute a target variable pair with a significant interaction effect. In practice, it has been found that when "average monthly repayment amount" increases, if it is accompanied by frequent (high) "recent credit inquiry frequency," the default risk does not actually decrease as expected, but rather increases. This indicates that the conventional positive contribution of "average monthly repayment amount" is weakened under conditions of high credit inquiry frequency, revealing complex interactions between variable pairs. Finally, the similarity of all target variable pairs is plotted as an interaction graph. Through the above implementation method, not only can variables that have a direct impact on default prediction be identified, but also implicit interactions between variables can be revealed.

[0045] In an exemplary embodiment, after filtering the first set of target variables based on interaction degree and fit degree to obtain the second set of target variables, the method further includes: determining the variable symbol corresponding to any variable in the second set of target variables appearing simultaneously in multiple variable intervals, thereby obtaining multiple variable symbols; if at least two of the multiple variable symbols are different from the other variable symbols, suspending the participation of the variables in the second set of target variables in the training of the target model, wherein the target model is a model trained and learned using a pre-defined business dataset; if all the variable symbols are the same, allowing the variables in the second set of target variables to participate in the training of the target model, and identifying a portion of the sample data corresponding to the variables in the second set of target variables as key training data.

[0046] In other words, if a bank's credit card default prediction project obtains a second set of target variables through the above screening process, including key variables such as "average monthly repayment amount," "recent credit inquiry frequency," and "full-time employment status," then the consistency of these variables across different ranges is checked to determine their suitability for model training. Taking "average monthly repayment amount" as an example, its value range is divided into several intervals, such as 0-2000 yuan, 2001-4000 yuan, and 4001-6000 yuan. Then, the sample size for each interval and the sign of its corresponding "average monthly repayment amount" SHAP value are counted. If it is found that in the "0-2000 yuan" interval, most samples have negative SHAP values ​​(meaning low repayment amounts are associated with increased default risk), while in the "4001-6000 yuan" interval, most samples have positive SHAP values ​​(meaning high repayment amounts are associated with decreased default risk), this indicates that the effect of "average monthly repayment amount" is inconsistent across different intervals, potentially indicating a complex relationship or anomaly in data distribution. In this scenario, "average monthly repayment amount" will be tentatively used in the training of the target model. Conversely, if the SHAP value of the binary categorical variable "full-time employment status" maintains a consistent sign across all intervals (i.e., "yes" or "no"), for example, consistently showing a negative contribution (reducing default risk) when the full-time employment status is "yes," then it can be considered highly consistent in direction. In this case, "full-time employment status" will be allowed to participate in the training of the target model, and this sample data will be identified as key training data—the crucial input for deeper model training—ensuring the model can more fully and accurately understand this type of variable. This consistency check and key training data identification process ensures the quality and representativeness of the data used during model training, while also enhancing the understanding of the mechanisms by which key variables function.

[0047] In an exemplary embodiment, when at least two variable symbols differ from the other variable symbols among multiple variable symbols, after suspending the participation of variables in the second target variable set in the training of the target model, the method further includes: labeling all target variables in the second target variable set whose variable symbols change in different variable intervals to obtain labeling results; performing variable elimination processing on the second target variable set based on the labeling results to obtain a third target variable set; and using the third target variable set to replace the second target variable set to control the training of the target model.

[0048] For example, suppose a second set of target variables has been selected, including variables such as "average monthly repayment amount," "recent credit inquiry frequency," and "full-time employment status," for training a credit card default prediction model. However, further examination reveals that the sign (contribution direction) of the SHAP value of "average monthly repayment amount" changes across different intervals. To address this, "average monthly repayment amount" is first labeled, and its contribution sign changes across different intervals. Based on the labeling results, "average monthly repayment amount" is removed from the second set of target variables, resulting in a third set of target variables. During the model training phase, the third set of target variables replaces the original second set, controlling the training process of the target model. In this way, the model will learn only from variables with consistent direction and aligned with business logic, thereby improving the model's predictive performance and interpretability, and reducing model fluctuations and biases caused by inconsistent variable directions.

[0049] In an exemplary embodiment, the interaction degree between different variables in the first variable set and the fit degree between different variables and preset business logic are calculated. Based on the interaction degree and the fit degree, the first variable set is filtered to obtain a second variable set. This includes: identifying multiple first variables in the first variable set whose interaction degree is greater than a preset interaction degree threshold, and determining a first subset of the first variables based on the identification results; identifying multiple first variables in the second variable set whose fit degree is greater than a preset fit threshold, and determining a second subset of the first variables based on the identification results; and summing the first variables in the first subset and the second subset to obtain the second variable set.

[0050] In simple terms, suppose in a credit default risk prediction project, a first set of variables has been identified through directional consistency analysis, including variables such as "average monthly repayment," "credit history length," "income level," and "marital status." Setting a preset threshold for interaction (e.g., 0.5), the interaction between "average monthly repayment" and "income level" is greater than 0.6, meaning these two variables have a significant interaction effect in predicting default risk. Therefore, "average monthly repayment" and "income level" are grouped into the first subset. Regarding fit, assuming a preset fit threshold of 0.8, statistics show that "credit history length" has a fit of 0.9 with business logic, meaning that in most cases, a longer credit history does indeed correspond to a lower default risk. Therefore, "credit history length" is grouped into the second subset. Finally, the variables from the first subset ("average monthly repayment" and "income level") and the second subset ("credit history length") are combined to form the second set of variables. By using this selection process based on interactivity and relevance, a more concise and business-logic-compliant set of variables can be constructed for training the predictive model. This not only improves the accuracy and stability of the model's predictions but also ensures the business interpretability and compliance of the model results.

[0051] In an exemplary embodiment, before determining the variable contribution value corresponding to multiple variable combinations in the business dataset, the method further includes: preprocessing the business dataset, wherein the preprocessing includes at least one of the following: scaling the variable values ​​in the business dataset, imputing missing values ​​in the business dataset; dividing the preprocessed business dataset into a training set and a validation set according to a preset partitioning ratio; using the training set to perform preliminary iteration on the target model to obtain a first training model, and using the validation set to validate the first training model; and determining whether to update the business dataset based on the validation results.

[0052] Optionally, assume you are processing a business dataset containing a large amount of credit card user data, including features such as "average monthly repayment," "number of credit inquiries," "income level," "educational background," and "employment status." Since "average monthly repayment" and "income level" are significantly larger than other variables in the original dataset, you use MinMaxScaler or Z-score standardization to scale these numerical variables, ensuring all variables are compared on the same scale. For categorical variables such as "educational background," you use mode imputation to handle missing values, while for numerical variables such as "income level," you use median imputation to reduce the impact of missing data on model training. Next, divide the preprocessed business dataset into training and validation sets, with a ratio of 70%-30%. Use the training set to initially train the target model (e.g., random forest), obtaining the first trained model. Validate the model using the validation set, evaluating metrics such as the AUC (Area Under the Curve, ROC (Receiver Operating Characteristic) curve) or F1 score. Assuming the validation results indicate that the model's ability to predict default among high-income users is insufficient, there may be issues with the complex interactions between variables not being adequately considered. Based on these validation results, the aforementioned business dataset is updated, such as by increasing the sample size of high-income groups or re-examining the variable encoding methods, to ensure that the model can more accurately capture the default risk characteristics of these groups. This preprocessing and initial training validation process ensures that the business dataset used for model training is of high quality and the model performs well initially, laying the foundation for further refined feature selection and model tuning.

[0053] To better understand the process of the above variable selection method, the following description, in conjunction with optional embodiments, further illustrates the process of the above variable selection method, but is not intended to limit the technical solutions of the embodiments of this application.

[0054] In related technologies, the variable selection process for machine learning models primarily relies on traditional statistical indicators such as information gain, information value (IV), or the ranking of feature importance within the model. While these methods can provide a rough assessment of a variable's predictive performance, they have limitations in deeply revealing the stability of the variable's influence on the prediction direction and its consistency with business logic. Specifically, it is difficult to capture the directional variation of variables across different sub-sample sets; that is, the same variable may contribute positively in some samples but become negatively in others. This inconsistency and volatility pose challenges to the interpretability and robustness of the model. Furthermore, it does not adequately consider how the interactions between variables affect model predictions, nor how to systematically verify the fit between variables and the logic of specific industries or business scenarios. There is a lack of effective mechanisms to exclude variables that, while statistically important, contradict business realities.

[0055] To address the aforementioned issues, this application proposes an optional embodiment of a SHAP-based variable selection method. This method quantifies the marginal contribution of each variable to the model's prediction results by calculating SHAP values. Next, these SHAP values ​​are binned to assess the directional consistency of variables across different data intervals, ensuring that the contribution direction of the variables is stable and consistent with business logic. Then, dependency graphs are used to analyze the interactions between variables and identify variable combinations consistent with business expectations. Finally, through a structured selection process, combining variable contribution, directional consistency, interaction, and business logic consistency analysis, the optimal set of variables is automatically selected for model construction, while a detailed selection report is output to support model auditing and post-evaluation.

[0056] Optionally, the SHAP value is a game theory-based method for interpreting feature importance, used to quantify the marginal contribution of each variable to the model output.

[0057] Optionally, directional consistency refers to the consistency of the sign (positive / negative) of the SHAP value of the corresponding sample for a variable at a specific value in the vast majority of samples, reflecting the stability of the direction of the variable's influence on the model output.

[0058] Optional, Figure 3 This is a schematic flowchart of a SHAP-based variable selection method according to an embodiment of this application, specifically including the following steps:

[0059] Step 1: Data Preprocessing. First, perform necessary cleaning and preprocessing on the raw data, including but not limited to standardizing variable values, filling missing values, and converting categorical variables to numerical representations, to ensure that the data quality and format are suitable for subsequent modeling and analysis.

[0060] Step 2: Model Training. Use the preprocessed data to train a machine learning model that supports SHAP value extraction. Typically, the XGBoost ensemble tree model is recommended, as it not only has high accuracy but also provides a more intuitive and effective interpretation of SHAP values.

[0061] Step 3: Calculate contribution values. Once the model training is complete, use the SHAP interpretation tool to calculate the contribution value (SHAP value) for each variable for each sample, thereby quantifying the marginal contribution of each feature to the model's prediction results.

[0062] Step 4: Variable Binning. The calculated SHAP values ​​are binned for each variable. By dividing the variable's value range into multiple consecutive intervals or buckets, the effects of the variable across different value ranges can be observed more closely, laying the foundation for further directional consistency analysis.

[0063] Step 5: Directional Consistency Check. Based on the binned data, calculate the ratio of positive to negative directions of the variable's SAP value within each bin to determine whether the variable contributes to the model output in a consistent direction in most cases.

[0064] Optionally, if an increase in a variable's value also significantly increases the corresponding SHAP value (or vice versa), then the variable can be considered to have directional consistency with the target. This consistency can be quantified by calculating the proportion of variables moving in the same direction after binning. A directional consistency threshold (e.g., 80%) is set; variables below this threshold are considered directionally unstable and are not recommended to be retained in the model. If the value is above the threshold, the variable is considered "directionally stable." This consistency, as part of the variable importance determination, improves the interpretability and robustness of the results.

[0065] As an optional embodiment, Figure 4 This is a flowchart of a directional consistency check according to an embodiment of this application, specifically including the following steps:

[0066] First, the variable values ​​are binned according to their data format. The variable's value range is divided into multiple intervals or bins, each bin representing a specific range of variable values. For continuous variables, equal-width or equal-frequency binning strategies can be used; for categorical variables, each category constitutes a bin. Next, within each bin, the number of samples with positive contributions (SHAP>0), zero contributions (SHAP=0), and negative contributions (SHAP<0) and their respective proportions to the total number of samples in that bin are counted and calculated. Then, the directional consistency ratio is calculated. For each bin, if the proportion of positive contribution samples significantly exceeds the proportion of negative contribution samples (e.g., the proportion of positive contribution samples is greater than a threshold), the sign of that bin is determined to be positive; conversely, if the proportion of negative contribution samples is greater than the threshold, the sign is determined to be negative. Next, directional consistency is summarized. For each bin of the variable, the above sign consistency determination is performed. Finally, the proportion of all bins with consistently positive or consistently negative signs is counted to calculate the overall directional consistency of the variable. Finally, compared with the threshold, if the variable shows a consistent direction (whether positive or negative) in most bins (exceeding the preset global directional consistency threshold, such as 90%), it can be determined that the variable has good directional consistency with the model prediction and is suitable for retention; otherwise, it is removed from the model.

[0067] It should be noted that the positive contribution ratio indicates the strength of the positive impact of increasing the variable on the model's prediction results; the negative contribution ratio reflects the degree of negative impact of increasing the variable; and the zero contribution ratio means that the variable has no significant impact on the prediction results in this range.

[0068] Step Six: Variable Interaction Analysis. Based on the above screening results, the final variables to be included in the model can be determined by combining the SHAP dependency graph of each variable with the overall model performance and business logic, as follows:

[0069] Optionally, a dependency plot is a graph that describes the relationship between a variable's value and its corresponding SHAP value, which can reveal the non-linear contribution relationship of the variable.

[0070] Optional, Figure 5 This is a variable SHAP dependency graph (a) according to an embodiment of this application. The horizontal axis represents the value of variable 1, the vertical axis represents the corresponding SHAP value, and the color axis represents the different categories of variable 5 (a categorical variable) that is most correlated with variable 1. Figure 5 As can be seen, there is a clear U-shaped relationship between the value of variable 1 and the SHAP value. That is, when the value of variable 1 is at both ends, its contribution to the model prediction result is larger, while when its value is close to the middle position, its contribution is relatively smaller.

[0071] Optional, in Figure 5In this study, the sign (positive / negative) of the SHAP values ​​of variable 1 across different value ranges was statistically analyzed. It can be seen that variable 1 primarily exhibits a positive contribution (SHAP value > 0) in smaller and larger value ranges, while it primarily exhibits a negative contribution (SHAP value < 0) near the intermediate value. This consistency in direction across different ranges, combined with the U-shaped distribution, indicates that variable 1 has a significant discriminative power for model prediction, and its contribution direction aligns with business logic: under extreme conditions (low or high values), variable 1 has a positive impact on the prediction results, while under moderate conditions, it has a negative impact.

[0072] Optional, Figure 5 The interaction between variable 1 and variable 5 is illustrated using a color heatmap. When the value of variable 1 is around 45, the color distribution of the heatmap (from red at the top and blue at the bottom to blue at the top and red at the bottom) changes significantly. This indicates that when different categories of variable 5 are combined with the values ​​of variable 1, they can more finely distinguish the samples, enhancing the model's predictive performance and interpretability. Therefore, it is advisable to include both variables in the model to improve the overall performance.

[0073] Optional, Figure 6 This is a variable SHAP dependency graph (II) according to an embodiment of this application, in Figure 6 In the graph, the horizontal axis shows the range of values ​​for variable 2, while the vertical axis represents the SHAP value of variable 2 in different samples.

[0074] It is worth noting that the distribution of SHAP values ​​did not change significantly as the value of variable 2 increased, meaning that the contribution of variable 2 remained essentially constant across different value levels. Furthermore, the SHAP values ​​for all samples were greater than zero, indicating that regardless of the value range of variable 2, its influence on the model's prediction results was consistently positive.

[0075] Optional, in Figure 6 In the diagram, the color heatmap represents the category of variable 9, used to visualize the potential correlation between the SHAP value of variable 2 and the value of variable 9. However, the insignificant change in the color distribution indicates that the SHAP value of variable 2 is unaffected by variable 9, even if the value of variable 9 changes. Figure 6 The color intensity of the heatmap remained almost unchanged, failing to show a strong interaction between variable 2 and variable 9, and also failing to provide additional distinguishing information, thus limiting the model's ability to process complex data structures.

[0076] It should be noted that although variable 2 contributes consistently to the model's predictions, its contribution level does not change much with its own value, and it lacks a significant interaction effect with related variable 9, resulting in poor discriminative power for variable 2. According to the variable selection criteria of this invention, variables that contribute little to the model's discriminative power, are disconnected from business logic, or lack effective interaction with highly correlated variables are considered unnecessary elements for optimizing the model. Therefore, variable 2, due to its low contribution to the model's discriminative power, lacks a clear connection to business logic, or lacks effective interaction with highly correlated variables, is not considered a necessary element for optimizing the model. Figure 6 The characteristics exhibited in the model can be considered for removal from the final model to improve its efficiency, stability, and business interpretability. It is important to note that when making decisions about removing variables, in addition to relying on… Figure 6 The information provided should also be combined with other statistical indicators (such as feature importance scores), business rules, and expert knowledge to ensure that the model can cover important business logic and risk factors while maintaining interpretability and accuracy.

[0077] Step 7: Output Results. After completing the directional consistency test and necessity assessment of the variables, the screening results are transformed into specific application guidelines, namely, the list of validated variables and their corresponding scores are output for subsequent model building.

[0078] In summary, this application constructs a machine learning model that supports SHAP value calculation. Machine learning models, due to their non-linearity and powerful feature learning capabilities, perform exceptionally well on complex datasets, and SHAP values ​​can effectively decompose model prediction results, revealing the contribution of each feature. Next, the SHAP method is used to interpret the importance of each variable in the model. SHAP values ​​can not only measure the global importance of variables but also delve into their marginal contributions to individual predictions. Subsequently, SHAP values ​​are binned to analyze the stability of their influence direction in conjunction with the specific values ​​of the variables. That is, whether the positive and negative contributions of variables remain consistent across different intervals, and whether this consistency aligns with business logic. Finally, a directional consistency index is introduced as an important screening criterion to evaluate the direction of the SHAP values ​​of variables, measuring the degree of consistency of the variable's influence on the target variable (such as credit risk or fraud detection results). This ensures that the retained variables not only demonstrate stable positive and negative contributions in model predictions but also conform to the actual logic of the business scenario, thereby improving the model's interpretability and business applicability.

[0079] Through the above description of the implementation strategies, those skilled in the art can clearly understand that the variable screening method according to the above embodiments can be implemented by means of software plus the necessary general-purpose hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation strategy. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software device. This computer software device is stored in a storage medium (such as ROM / RAM, disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the variable screening method of the various embodiments of this application.

[0080] This embodiment also provides an execution device for a variable screening task, which is used to implement the above embodiments and preferred implementation strategies, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0081] Figure 7 This is a structural block diagram of a variable screening device according to an embodiment of this application; as shown below. Figure 7 As shown, it includes:

[0082] The first determining module 72 is used to determine the variable contribution value corresponding to multiple variable combinations related to risk prediction in the business data set. Each variable combination includes: a first variable that changes only itself and is not affected by changes in other variables, and a second variable that is affected by changes in the first variable. The variable contribution value is the contribution value of the first variable to the risk prediction result corresponding to the second variable.

[0083] Extraction module 74 is used to extract multiple first variables from the multiple variable combinations and divide the multiple first variables into multiple variable intervals according to a preset business scope;

[0084] The statistics module 76 is used to calculate the first proportion corresponding to the contribution value of positive variables and the second proportion corresponding to the contribution value of negative variables in the multiple variable intervals, and to determine the first variable set based on the relationship between the first proportion and the second proportion.

[0085] The calculation module 78 is used to calculate the interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic, and to filter the first variable set based on the interaction degree and the fit degree to obtain a second variable set.

[0086] Using the aforementioned apparatus, the variable contribution values ​​corresponding to multiple combinations of variables related to risk prediction in the business dataset are determined. Each variable combination includes: a first variable whose own changes are unaffected by changes in other variables, and a second variable affected by changes in the first variable. The variable contribution value is the contribution of the first variable to the risk prediction result corresponding to the second variable. Multiple first variables are extracted from the multiple variable combinations and divided into multiple variable intervals according to a preset business scope. The first proportion corresponding to positive variable contribution values ​​and the second proportion corresponding to negative variable contribution values ​​are statistically analyzed within the multiple variable intervals. A first variable set is determined based on the relationship between the first and second proportions. The interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic are calculated. Based on the interaction degree and the fit degree, the first variable set is filtered to obtain a second variable set. This technical solution solves the problem in traditional risk prediction models where variable filtering does not fully consider the consistency between the contribution direction of variables in different samples and the business logic, leading to a decrease in the model's risk prediction capability. Furthermore, by evaluating the stability of the contribution direction of variables in the business dataset to the risk prediction results and their fit with the business logic, and combining the interaction analysis between variables, a second set of variables with consistent direction and business relevance was selected, which effectively improved the accuracy of the risk prediction model.

[0087] In an exemplary embodiment, the above-mentioned statistical module is further configured to determine multiple variables corresponding to positive variable contribution values ​​as a first variable set when the size relationship indicates that the first proportion is greater than or equal to the second proportion; and to determine multiple variables corresponding to negative variable contribution values ​​as a first variable set when the size relationship indicates that the first proportion is less than the second proportion.

[0088] In an exemplary embodiment, the above-described apparatus further includes: a combination module, configured to, after determining a first variable set based on the size relationship between a first proportion and a second proportion, combine any two different variables in the first variable set to construct multiple sets of variable pairs, and determine the similarity between different variables in each set of variable pairs; obtain multiple target variable pairs whose similarity is greater than or equal to a preset similarity threshold from among the multiple similarity values ​​corresponding to the multiple sets of variable pairs; and draw an interaction relationship diagram of the first variable set based on the multiple target variable pairs, wherein the interaction relationship diagram is used to display the interaction strength of different variables in the first variable set.

[0089] In an exemplary embodiment, the above apparatus further includes: a second determining module, configured to, after filtering the first target variable set based on interaction degree and fit degree to obtain a second target variable set, determine the variable symbol corresponding to any variable in the second target variable set appearing simultaneously in multiple variable intervals, thereby obtaining multiple variable symbols; if at least two variable symbols among the multiple variable symbols are different from the other variable symbols, suspend the participation of the variables in the second target variable set in the training of the target model, wherein the target model is a preset model trained and learned through a business dataset; if all variable symbols among the multiple variable symbols are the same, allow the variables in the second target variable set to participate in the training of the target model, and determine the partial sample data corresponding to the variables in the second target variable set as key training data.

[0090] In an exemplary embodiment, the second determining module further includes: a marking unit, configured to, when at least two variable symbols in a plurality of variable symbols are different from the other variable symbols, after suspending the participation of variables in the second target variable set in the training of the target model, mark all target variables in the second target variable set whose variable symbols have changed in different variable intervals, and obtain marking results; perform variable elimination processing on the second target variable set based on the marking results to obtain a third target variable set; and use the third target variable set to replace the second target variable set to control the training of the target model.

[0091] In an exemplary embodiment, the aforementioned calculation module is further configured to calculate the interaction degree between different variables in the first variable set and the fit degree between different variables and preset business logic, and to filter the first variable set based on the interaction degree and fit degree to obtain a second variable set, including: identifying multiple first variables in the first variable set whose interaction degree is greater than a preset interaction degree threshold, and determining a first subset of the first variables based on the identification results; identifying multiple first variables in the second variable set whose fit degree is greater than a preset fit threshold, and determining a second subset of the first variables based on the identification results; and summing the first variables in the first subset and the second subset to obtain the second variable set.

[0092] In an exemplary embodiment, the above apparatus further includes: a processing module, configured to preprocess the business dataset before determining the variable contribution values ​​corresponding to multiple variable combinations in the business dataset, wherein the preprocessing includes at least one of the following: scaling the variable values ​​in the business dataset, imputing missing values ​​in the business dataset; dividing the preprocessed business dataset into a training set and a validation set according to a preset partitioning ratio; performing preliminary iterations on the target model using the training set to obtain a first training model, and validating the first training model using the validation set; and determining whether to update the business dataset based on the validation results.

[0093] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the variable filtering methods described above when it is run.

[0094] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0095] S1, determine the variable contribution value corresponding to multiple variable combinations related to risk prediction in the business dataset. Each variable combination includes: a first variable that changes only itself and is not affected by changes in other variables, and a second variable that is affected by changes in the first variable. The variable contribution value is the contribution value of the first variable to the risk prediction result corresponding to the second variable.

[0096] S2, extract multiple first variables from the multiple variable combinations, and divide the multiple first variables into multiple variable intervals according to a preset business scope;

[0097] S3, calculate the first proportion corresponding to the contribution value of positive variables and the second proportion corresponding to the contribution value of negative variables in the multiple variable intervals, and determine the first variable set based on the relationship between the first proportion and the second proportion;

[0098] S4, calculate the interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic, and filter the first variable set based on the interaction degree and the fit degree to obtain the second variable set.

[0099] Embodiments of this application also provide a computer program product, including a computer program, wherein the computer program, when executed by a processor, performs the steps in any of the above method embodiments.

[0100] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0101] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0102] S1, determine the variable contribution value corresponding to multiple variable combinations related to risk prediction in the business dataset. Each variable combination includes: a first variable that changes only itself and is not affected by changes in other variables, and a second variable that is affected by changes in the first variable. The variable contribution value is the contribution value of the first variable to the risk prediction result corresponding to the second variable.

[0103] S2, extract multiple first variables from the multiple variable combinations, and divide the multiple first variables into multiple variable intervals according to a preset business scope;

[0104] S3, calculate the first proportion corresponding to the contribution value of positive variables and the second proportion corresponding to the contribution value of negative variables in the multiple variable intervals, and determine the first variable set based on the relationship between the first proportion and the second proportion;

[0105] S4, calculate the interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic, and filter the first variable set based on the interaction degree and the fit degree to obtain the second variable set.

[0106] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical discs.

[0107] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation strategies, and will not be repeated here.

[0108] The collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0109] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0110] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0111] The above description is merely a preferred implementation strategy of this application. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A variable selection method, characterized in that, include: Determine the variable contribution value corresponding to multiple combinations of variables related to risk prediction in the business dataset. Each variable combination includes: a first variable that changes only itself and is not affected by changes in other variables, and a second variable that is affected by changes in the first variable. The variable contribution value is the contribution value of the first variable to the risk prediction result corresponding to the second variable. Extract multiple first variables from the multiple variable combinations, and divide the multiple first variables into multiple variable intervals according to a preset business scope; Calculate the first proportion corresponding to the contribution value of positive variables and the second proportion corresponding to the contribution value of negative variables in the multiple variable intervals, and determine the first variable set based on the relationship between the first proportion and the second proportion; Calculate the interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic, and filter the first variable set based on the interaction degree and the fit degree to obtain the second variable set.

2. The variable selection method according to claim 1, characterized in that, The first set of variables is determined based on the relationship between the first proportion and the second proportion, including: When the size relationship indicates that the first proportion is greater than or equal to the second proportion, the multiple variables corresponding to the positive variable contribution value are determined as the first variable set; When the size relationship indicates that the first proportion is less than the second proportion, the multiple variables corresponding to the contribution values ​​of the negative variables are determined as the first variable set.

3. The variable selection method according to claim 1, characterized in that, After determining the first set of variables based on the relationship between the first proportion and the second proportion, the method further includes: Combine any two different variables in the first variable set to construct multiple sets of variable pairs, and determine the similarity between different variables in each set of variable pairs; Obtain multiple target variable pairs whose similarity is greater than or equal to a preset similarity threshold from among the multiple sets of variable pairs; An interaction graph of the first variable set is drawn based on the multiple target variable pairs, wherein the interaction graph is used to show the interaction strength of different variables in the first variable set.

4. The variable selection method according to claim 1, characterized in that, After filtering the first set of target variables based on the interaction degree and the fit degree to obtain the second set of target variables, the method further includes: Determine the variable sign when any one variable in the second set of target variables appears simultaneously in multiple variable intervals, thus obtaining multiple variable signs; If at least two of the multiple variable symbols are different from the other variable symbols, the training of the variables in the second target variable set is suspended. The target model is a model that is pre-trained using a business dataset. If all variable symbols are the same among the multiple variable symbols, the variables in the second target variable set are allowed to participate in the training of the target model, and the sample data corresponding to the variables in the second target variable set are determined as the key training data.

5. The variable selection method according to claim 4, characterized in that, If at least two of the multiple variable symbols are different from the other variable symbols, after pausing the participation of variables in the second target variable set in the training of the target model, the method further includes: For all target variables in the second set of target variables whose sign changes in different variable intervals, mark the target variables to obtain the marking results; Based on the labeling results, the second target variable set is subjected to variable elimination processing to obtain the third target variable set; The training of the target model is controlled by replacing the second set of target variables with the third set of target variables.

6. The variable selection method according to claim 1, characterized in that, Calculate the interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic, and filter the first variable set based on the interaction degree and the fit degree to obtain a second variable set, including: Identify multiple first variables in the first variable set whose interaction degree is greater than the preset interaction degree threshold, and determine a first subset of the first variables based on the identification results; Identify multiple first variables in the second variable set whose fit is greater than the preset fit threshold, and determine a second subset of the first variables based on the identification results; The first variable is obtained by combining the first variable from the first subset and the first variable from the second subset.

7. The variable selection method according to claim 1, characterized in that, Before determining the variable contribution values ​​corresponding to multiple combinations of variables related to risk prediction in the business dataset, the method further includes: The business dataset is preprocessed, wherein the preprocessing includes at least one of the following: scaling the variable values ​​in the business dataset, and imputing missing values ​​in the business dataset; The preprocessed business dataset is divided into a training set and a validation set according to a preset partitioning ratio. The target model is initially iterated using the training set to obtain a first training model, and the first training model is validated using the validation set. Based on the verification results, determine whether to update the business dataset.

8. A variable screening device, characterized in that, include: The first determining module is used to determine the variable contribution value corresponding to multiple combinations of variables related to risk prediction in the business dataset. Each variable combination includes: a first variable that changes only itself and is not affected by changes in other variables, and a second variable that is affected by changes in the first variable. The variable contribution value is the contribution value of the first variable to the risk prediction result corresponding to the second variable. The extraction module is used to extract multiple first variables from the multiple variable combinations and divide the multiple first variables into multiple variable intervals according to a preset business scope; The statistics module is used to calculate the first proportion corresponding to the contribution value of positive variables and the second proportion corresponding to the contribution value of negative variables in the multiple variable intervals, and to determine the first variable set based on the relationship between the first proportion and the second proportion. The calculation module is used to calculate the interaction degree between different variables in the first variable set and the fit degree between the different variables and the preset business logic, and to filter the first variable set based on the interaction degree and the fit degree to obtain a second variable set.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the variable selection method according to any one of claims 1 to 7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the variable selection method according to any one of claims 1 to 7.