Feature screening method and device, computer equipment and storage medium
Through the feature screening method combined with a multi-level feature screening mechanism and a greedy algorithm, the feature combination is dynamically optimized, which solves the limitations of the existing technology under the rapidly changing data sets and complex feature relationships, and achieves continuous optimization and performance improvement.
Patent Information
- Application Number
- CN202411905688.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
Smart Images

Figure CN119829969A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a feature screening method, device, computer equipment and storage medium. Background Art
[0002] In the prior art, feature selection mainly relies on statistics and machine learning methods. For example, features are screened using methods such as random forest parameter importance, IV value, WOE coding, correlation coefficient, and stepwise regression. These methods select features that contribute more to the performance of the risk control model by independently calculating or step-by-step screening of features. Random forest is an integrated learning method that screens features by calculating the importance of each feature to the prediction of the risk control model. WOE (Weight of Evidence) and IV (Information Value) values are used to measure the correlation between features and target variables, and are usually used for feature screening in credit scoring modeling. Stepwise regression and correlation coefficients gradually add or remove features to find the best feature set that can explain the target variable.
[0003] However, the applicant found that existing feature selection methods have obvious limitations when dealing with rapidly changing data sets and complex feature relationships. First, traditional methods often rely on preset rules or single indicators, and fail to comprehensively consider multi-dimensional risk control model performance indicators, resulting in limited screening effects. Second, most of these methods are static, that is, manual feature screening and risk control model tuning are required each time, and it is difficult to automatically adapt to new data patterns. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a feature screening method, apparatus, computer device and storage medium to solve the problem that existing feature selection methods have obvious limitations when dealing with rapidly changing data sets and complex feature relationships.
[0005] In order to solve the above technical problems, the present application embodiment provides a feature screening method, which adopts the following technical solution:
[0006] Receiving a feature screening request sent by a user terminal, wherein the feature screening request includes an original feature set to be screened;
[0007] Performing a feature screening operation on the original feature set according to a multi-level feature screening mechanism to obtain a candidate feature set;
[0008] Performing hierarchical processing on the candidate feature set to obtain a hierarchical feature subset;
[0009] Performing key feature locking operations on the hierarchical feature subsets respectively to obtain key feature subsets;
[0010] Perform feature selection operations on the key feature subsets according to a greedy algorithm to obtain feature selection subsets;
[0011] Calling the initial risk control model, and inputting the feature selection subsets into the initial risk control model to perform risk control model training operations, and obtaining performance indicator data;
[0012] Performing a feature optimization operation on the key feature subset according to the reward function and the performance indicator data to obtain target feature data;
[0013] The target feature data is output to the user terminal.
[0014] Furthermore, the step of performing a feature optimization operation on the key feature subset according to the reward function and the performance indicator data to obtain target feature data specifically includes the following steps:
[0015] Calculate the complexity penalty term R based on the key feature subset complexity , where the complexity penalty term R complexity It is expressed as:
[0016] R complexity = -α×N features
[0017] Among them, α represents the hyperparameter, N features a number of features representing the subset of key features;
[0018] A quantity optimization operation is performed on the key feature subset according to the complexity penalty item to obtain the target feature data.
[0019] Furthermore, the performance indicator data includes an AUC indicator value, a KS indicator value, and an F1-score indicator value, and the step of performing a quantity optimization operation on the key feature subset according to the complexity penalty term to obtain the target feature data specifically includes the following steps:
[0020] The total reward function R of the key feature subset is calculated according to the complexity penalty term, the AUC index value, the KS index value, and the F1-score index value, wherein the total reward function R is expressed as:
[0021] R=R AUC +R KS +R F1 +R complesity
[0022] R AUC =(ΔAUC) 1.5
[0023] Among them, ΔAUC represents the performance improvement of the initial risk control model, R AUC represents the reward for the performance improvement ΔAUC, R KS and R F1 Respectively represent the rewards for improving the KS index value and the F1-score index value;
[0024] A stability optimization operation is performed on the key feature subset according to the total reward function to obtain the target feature data.
[0025] Furthermore, the step of performing a stability optimization operation on the key feature subset according to the total reward function to obtain the target feature data specifically includes the following steps:
[0026] Storing the feature selection subset and the total reward function in an experience pool;
[0027] Performing a random sampling operation in the experience pool to obtain a random sampling combination;
[0028] Performing an update operation on the deep Q network according to the random sampling combination and the DQN algorithm to obtain a feature combination with a high reward;
[0029] A feature optimization operation is performed on the high-reward feature combination according to the greedy algorithm to obtain the target feature data.
[0030] Furthermore, the step of performing a feature optimization operation on the high-reward feature combination according to the greedy algorithm to obtain the target feature data specifically includes the following steps:
[0031] After performing feature optimization operation on the high-reward feature combination according to the greedy algorithm in each round, the proportion ε of the greedy algorithm is decayed according to an exponential decay function, wherein the exponential decay function is expressed as:
[0032] ε new =ε initial ×exp(-λ×t)
[0033] Among them, ε initial represents the initial exploration ratio, λ represents the decay rate, and t represents the current iteration round;
[0034] Perform feature optimization operations on the feature combination obtained in the previous round according to the greedy algorithm after attenuation processing;
[0035] After performing a feature optimization operation on the feature combination obtained in the previous round according to the greedy algorithm of the minimum decay function, the target feature data is obtained.
[0036] Furthermore, after the step of outputting the target feature data to the user terminal, the following steps are also included:
[0037] Performing a risk control model training operation on the initial risk control model according to the target feature data to obtain current round performance indicator data;
[0038] Determine whether the current round performance indicator data meets the risk control model performance conditions;
[0039] If the current round of performance indicator data meets the performance conditions of the risk control model, the initial risk control model after the risk control model training is confirmed as the target risk control model, and the target risk control model is deployed and put online;
[0040] If the current round of performance indicator data does not meet the performance conditions of the risk control model, the feature optimization operation is repeated on the key feature subset.
[0041] In order to solve the above technical problems, the embodiment of the present application further provides a feature screening device, which adopts the following technical solution:
[0042] A request acquisition module, configured to receive a feature screening request sent by a user terminal, wherein the feature screening request includes an original feature set to be screened;
[0043] A feature screening module, used to perform a feature screening operation on the original feature set according to a multi-level feature screening mechanism to obtain a candidate feature set;
[0044] A hierarchical processing module, used for performing hierarchical processing on the candidate feature set to obtain a hierarchical feature subset;
[0045] A key feature locking module, used to perform key feature locking operations on the hierarchical feature subsets respectively to obtain key feature subsets;
[0046] A feature selection module, used for performing feature selection operations on the key feature subsets according to a greedy algorithm to obtain feature selection subsets;
[0047] A risk control model training module is used to call the initial risk control model and input the feature selection subset into the initial risk control model to perform a risk control model training operation to obtain performance indicator data;
[0048] A feature optimization module, used to perform a feature optimization operation on the key feature subset according to the reward function and the performance indicator data to obtain target feature data;
[0049] A target feature output module is used to output the target feature data to the user terminal.
[0050] Furthermore, the feature optimization module includes:
[0051] The penalty term calculation submodule is used to calculate the complexity penalty term R according to the key feature subset. complexity , where the complexity penalty term R complexity It is expressed as:
[0052] R complexity = -α×N features
[0053] Among them, α represents the hyperparameter, N features a number of features representing the subset of key features;
[0054] The quantity optimization submodule is used to perform a quantity optimization operation on the key feature subset according to the complexity penalty term to obtain the target feature data.
[0055] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0056] It includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the feature screening method described above when executing the computer-readable instructions.
[0057] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0058] The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the feature screening method described above are implemented.
[0059] The present application provides a feature screening method, comprising: receiving a feature screening request sent by a user terminal, wherein the feature screening request includes an original feature set to be screened; performing a feature screening operation on the original feature set according to a multi-level feature screening mechanism to obtain a candidate feature set; performing a hierarchical processing on the candidate feature set to obtain a hierarchical feature subset; performing a key feature locking operation on the hierarchical feature subsets to obtain a key feature subset; performing a feature selection operation on the key feature subsets according to a greedy algorithm to obtain a feature selection subset; calling an initial risk control model, and inputting the feature selection subsets into the initial risk control model to perform a risk control model training operation to obtain performance indicator data; performing a feature optimization operation on the key feature subsets according to a reward function and the performance indicator data to obtain target feature data; and outputting the target feature data to the user terminal. Compared with the prior art, the present application can continuously optimize and maintain performance improvement when dealing with data fluctuations and nonlinear relationships between features. In particular, it is required that the present application can dynamically optimize feature combinations based on real-time feedback, thereby improving screening efficiency and reducing dependence on preset rules. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0061] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0062] Figure 2 is a flow chart for implementing the feature screening method provided in the embodiment of the present application;
[0063] Figure 3 is a schematic diagram of the structure of a feature screening device provided in an embodiment of the present application;
[0064] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0066] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0067] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0068] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0069] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0070] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.
[0071] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .
[0072] It should be noted that the feature screening method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the feature screening device is generally set in the server / terminal device.
[0073] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0074] Continue to refer Figure 2 , shows a flow chart of an embodiment of a feature screening method according to the present application. The feature screening method comprises: step S201, step S202, step S203, step S204, step S205, step S206, step S207 and step S208.
[0075] In step S201, a feature screening request sent by a user terminal is received, wherein the feature screening request includes an original feature set to be screened.
[0076] In the embodiments of the present application, the user terminal refers to a terminal device used to execute the image processing method for preventing document abuse provided by the present application. The user terminal can be a mobile terminal such as a mobile phone, a smart phone, a laptop computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, etc., as well as a fixed terminal such as a digital TV, a desktop computer, etc. It should be understood that the examples of user terminals here are only for the convenience of understanding and are not used to limit the present application.
[0077] In step S202, a feature screening operation is performed on the original feature set according to a multi-level feature screening mechanism to obtain a candidate feature set.
[0078] In an embodiment of the present application, in the initial X stage of feature selection, a multi-level feature screening mechanism is used for preliminary screening, wherein the multi-level feature screening mechanism can be IV value, WOE coding, random forest importance and other methods to eliminate features with low correlation with risk performance.
[0079] In the embodiment of the present application, from the original feature set, the obviously irrelevant features are first quickly screened out by the method of WOE coding + IV value and random forest importance. After screening, a candidate feature set is generated, which contains features that may contribute to the model performance for further selection in the present application.
[0080] In step S203, the candidate feature set is hierarchically processed to obtain a hierarchical feature subset.
[0081] In the embodiment of the present application, the candidate feature set is layered to form different feature levels, including user behavior features, credit features, financial features, etc., and some key features are specified for each layer to ensure the basic characteristics of the model at that layer. The key features are locked in the subsequent steps, always remain in the feature subset, and will not be removed.
[0082] In step S204, key feature locking operations are performed on the hierarchical feature subsets respectively to obtain key feature subsets.
[0083] In the embodiment of the present application, binary coding is used. For example, the feature set contains 50 commonly used risk control features. After they are layered, key features are selected for each layer and locked. The obtained feature subset is represented as a binary vector 1110100... with a length of 50, where 1 indicates that the feature is selected and 0 indicates that the feature is not selected. Specific key features are locked to 1 to ensure that they are not removed.
[0084] In step S205, feature selection operations are performed on the key feature subsets respectively according to the greedy algorithm to obtain feature selection subsets.
[0085] In the embodiment of the present application, the feature selection operation may be "select feature" or "remove feature", specifically:
[0086] Select feature: This application can select a feature from the unselected non-critical feature set and add it to the current feature subset.
[0087] Remove feature: This application can remove a non-critical feature from the current feature subset to simplify the feature combination and ensure the optimal number of features.
[0088] In the embodiment of the present application, after each action, the new feature selection result is reflected by updating the binary code of the state vector, wherein the code of the key feature remains at 1.
[0089] In the embodiment of the present application, the present application uses an ε-greedy strategy to balance exploration and exploitation, that is, to execute random actions with a probability of ε, and to select the action with the highest expected return with a probability of 1-ε.
[0090] In step S206, the initial risk control model is called, and the feature selection subsets are respectively input into the initial risk control model to perform risk control model training operations to obtain performance indicator data.
[0091] In the embodiments of the present application, the model performance indicators include the AUC, KS value and F1-score of the current model, which are used to help the present application comprehensively evaluate the effectiveness of the feature subset.
[0092] In the embodiment of the present application, after feature selection, the model is retrained through a logistic regression model, and the performance indicators of the model (including AUC, KS value and F1-score) are calculated, and the model performance indicators are used to calculate the reward and fed back to the present application. The model performance indicators of each feature subset are stored for subsequent use.
[0093] In the examples of the present application, AUC, KS value and F1-score are used as comprehensive evaluation criteria for model performance to ensure that comprehensive feedback can be obtained when selecting features.
[0094] In step S207, a feature optimization operation is performed on the key feature subset according to the reward function and the performance indicator data to obtain target feature data.
[0095] In an embodiment of the present application, the feature optimization operation refers to encouraging the present application to select a feature combination that improves model performance based on a reward function while avoiding the problem of excessive model complexity.
[0096] In step S208, the target feature data is output to the user terminal.
[0097] In an embodiment of the present application, a feature screening method is provided, including: receiving a feature screening request sent by a user terminal, wherein the feature screening request includes an original feature set to be screened; performing a feature screening operation on the original feature set according to a multi-level feature screening mechanism to obtain a candidate feature set; performing a hierarchical processing on the candidate feature set to obtain a hierarchical feature subset; performing a key feature locking operation on the hierarchical feature subsets to obtain a key feature subset; performing a feature selection operation on the key feature subsets according to a greedy algorithm to obtain a feature selection subset; calling an initial risk control model, and inputting the feature selection subsets into the initial risk control model to perform a risk control model training operation to obtain performance indicator data; performing a feature optimization operation on the key feature subsets according to a reward function and performance indicator data to obtain target feature data; and outputting the target feature data to the user terminal. Compared with the prior art, the present application can continuously optimize and maintain performance improvement when dealing with data fluctuations and nonlinear relationships between features. In particular, it is required that the present application can dynamically optimize feature combinations based on real-time feedback, thereby improving screening efficiency and reducing dependence on preset rules.
[0098] In some optional implementations of the embodiments of the present application, the step of performing feature optimization operations on the key feature subset according to the reward function and the performance indicator data to obtain the target feature data specifically includes the following steps:
[0099] Calculate the complexity penalty term R based on the key feature subset complexity , where the complexity penalty term R complexity It is expressed as:
[0100] R complexity = -α×N features
[0101] Among them, α represents the hyperparameter, N features The number of features representing the key feature subset;
[0102] According to the complexity penalty term, the key feature subset is optimized quantitatively to obtain the target feature data.
[0103] In the embodiment of the present application, the model complexity penalty term is calculated according to the number of features to control the increase in the number of features. The complexity penalty calculation formula is:
[0104] R complexity = -α×N features
[0105] Among them, α is a hyperparameter, N features is the number of features in the current feature subset. Through this penalty, this application avoids selecting too many features and keeps the model simple.
[0106] In some optional implementations of the embodiments of the present application, the above-mentioned performance index data includes an AUC index value, a KS index value, and an F1-score index value, and the step of performing a quantitative optimization operation on the key feature subset according to the complexity penalty term to obtain the target feature data specifically includes the following steps:
[0107] The total reward function R of the key feature subset is calculated based on the complexity penalty term, AUC index value, KS index value, and F1-score index value, where the total reward function R is expressed as:
[0108] R=R AUC +R KS +R F1 +R complesity
[0109] R AUC =(ΔAUC) 1.5
[0110] Among them, ΔAUC represents the performance improvement of the initial risk control model, R AUC Reward for performance improvement ΔAUC, R KS and R F1 Respectively represent the rewards for improving the KS index value and the F1-score index value;
[0111] According to the total reward function, stability optimization operations are performed on the key feature subset to obtain the target feature data.
[0112] In the embodiment of the present application, the purpose of designing the reward function is to encourage the present application to select a feature combination that improves model performance while avoiding excessive model complexity.
[0113] Model performance rewards: The rewards for model performance improvement are designed with nonlinear functions to amplify the difference in rewards. Taking the improvement of AUC as an example, the reward calculation formula for the model performance improvement ΔAUC is:
[0114] R AUC =(ΔAUC) 1.5
[0115] If ΔAUC is small, the reward is low; if ΔAUC is large, the reward is significantly increased. Through nonlinear amplification, this application tends to select features that significantly improve model performance.
[0116] In the embodiment of the present application, feature stability is introduced into the reward function to ensure that the selected features are not only suitable for the current data, but also remain stable in long-term applications. The feature stability score is obtained by calculating the fluctuation of each feature (such as the range of variation of AUC and KS values) on the historical data set, and additional rewards are given to features with high scores. This design ensures that the present application gives priority to features with high long-term stability, and the total reward is defined by the following formula:
[0117] R=R AUC +R KS +R F1 +R complesity
[0118] Among them, R KS and R F1 The rewards are for improving the KS value and F1-score, ensuring that the model has improvements in multiple performance indicators.
[0119] In an embodiment of the present application, after each round of actions is completed, the present application obtains feedback based on the total reward function and updates the strategy to improve the quality of future feature selection.
[0120] In some optional implementations of the embodiments of the present application, the step of performing stability optimization operation on the key feature subset according to the total reward function to obtain target feature data specifically includes the following steps:
[0121] Store the feature selection subset and the total reward function in the experience pool;
[0122] Perform random sampling operation in the experience pool to obtain random sampling combinations;
[0123] Update the deep Q network based on random sampling combinations and the DQN algorithm to obtain a high-reward feature combination;
[0124] According to the greedy algorithm, feature optimization operations are performed on the feature combination with high rewards to obtain the target feature data.
[0125] In the embodiment of the present application, the DQN algorithm is used to update the strategy, and the Q value function is approximated by a neural network to guide the action selection of feature selection. Specifically, the DQN algorithm parameter configuration is:
[0126] Learning Rate: Set to 0.005 to control the step size of Q network parameter update.
[0127] Discount Factor y: Set to 0.9 to define the importance of future rewards and ensure that this application focuses on long-term returns.
[0128] Experience Replay: Introduce an experience replay pool during training to store the state, action, reward, and subsequent state selected in each round. Randomly sample from the pool for training to break the correlation between samples and stabilize the training process.
[0129] Target Network: Use the target network and copy the parameters of the current Q network to the target network every 10 steps to reduce the fluctuation of Q value update.
[0130] In the embodiment of the present application, after each round of feature selection, the current feature combination and the corresponding reward are stored in the experience pool. During the training process, samples are randomly drawn from the experience pool, and the Q value network is updated using DQN, so that the present application gradually optimizes the feature selection strategy and gives priority to feature combinations that obtain high rewards.
[0131] In some optional implementations of the embodiments of the present application, the step of performing a feature optimization operation on a feature combination with a high reward according to a greedy algorithm to obtain target feature data specifically includes the following steps:
[0132] After each round of feature optimization operation on the feature combination with high reward according to the greedy algorithm, the proportion ε of the greedy algorithm is decayed according to the exponential decay function, where the exponential decay function is expressed as:
[0133] ε new =ε initial ×exp(-λ×t)
[0134] Among them, ε initial represents the initial exploration ratio, λ represents the decay rate, and t represents the current iteration round;
[0135] Perform feature optimization operations on the feature combination obtained in the previous round according to the greedy algorithm after attenuation processing;
[0136] After the feature combination obtained in the previous round is optimized according to the greedy algorithm of the minimum decay function, the target feature data is obtained.
[0137] In the embodiment of the present application, a decaying ε-greedy strategy is adopted, with a high initial exploration ratio, and the ε value is gradually reduced as the training progresses, to ensure that the present application explores multiple possible feature combinations in the early stages of training, and pays more attention to the use of existing strategies in the later stages. Specifically:
[0138] Initial value: The initial value of the exploration ratio ε is set to 0.9, which means that in the initial stage, this application has a 90% probability of selecting a random action to ensure the diversity of feature combinations.
[0139] Attenuation method: After each round of iteration, the exploration ratio ε is gradually reduced according to the exponential decay function, the formula is:
[0140] ε new =ε initial ×exp(-λ×t)
[0141] Among them, ε initial represents the initial exploration ratio, λ represents the decay rate, and t represents the current iteration round.
[0142] Minimum exploration value: When ε decays to 0.1, it stops decreasing further and maintains a minimum exploration probability of 10% to ensure that the application can still perform a small amount of exploration in the later stages of training to cope with possible data changes and small opportunities for improvement in the feature space.
[0143] In some optional implementations of the embodiments of the present application, the training of the present application is stopped according to one of the following conditions:
[0144] Stable performance: In 10 consecutive iterations, if the AUC, KS value and F1-score of the risk control model remain within the fluctuation range of 0.01, the risk control model is considered to have reached the optimal state and training is stopped.
[0145] Maximum number of iterations: When the number of training iterations reaches 9999, training is forcibly stopped to avoid excessive consumption of computing resources.
[0146] In some optional implementations of the embodiments of the present application, after the above step of outputting the target feature data to the user terminal, the following steps are also included:
[0147] Perform risk control model training operations on the initial risk control model according to the target feature data to obtain the performance indicator data of the current round;
[0148] Determine whether the current round of performance indicator data meets the performance conditions of the risk control model;
[0149] If the performance indicator data of the current round meets the performance conditions of the risk control model, the initial risk control model after the risk control model training is confirmed as the target risk control model, and the target risk control model is deployed and put online;
[0150] If the performance indicator data of the current round does not meet the performance conditions of the risk control model, the feature optimization operation is repeated on the key feature subset.
[0151] In practical applications, in the field of financial credit, historical order data is collected, including but not limited to order volume, order frequency, order amount, payment time, return rate, etc. These data are cleaned, standardized indicator processing is performed, and indicators are derived through aggregation, mapping, deformation, and cross-cutting, and finally more than 50 indicator features are generated. In the initial screening stage, features related to low risk performance are eliminated through IV value, WOE coding, random forest importance and other methods, and only the selected candidate feature set is retained. According to the feature type, it is divided into three layers of behavioral features, credit features and financial features. Six features are manually selected from them, including "order quantity", "earliest start time of order", "sales", "average collection cycle", "historical bill overdue times" and "whether there is a current bill overdue", covering the three-layer structure. These key features are always selected and locked in the entire selection process. The initial state vector is represented by binary code, the key feature is fixed to 1, such as 1110100..., and the remaining features are randomly selected to form the initial feature subset.
[0152] The selected features are put into the risk control model. After initializing the training of the risk control model using the logistic regression algorithm, the calculated AUC value is 0.72, the KS value is 0.35, and the F1-score is 0.68.
[0153] In this initial state, this application executes the "add feature" action according to the DQN strategy, selects the "number of months from the last order" feature to add to the feature subset, and updates the state vector to 1110110.... After retraining the risk control model, the performance indicators of the risk control model are improved to AUC value 0.75, KS value 0.38, and F1-score 0.71. The positive reward is calculated according to the reward function, and this feedback is used to update the DQN strategy.
[0154] In subsequent iterations, the application continuously adjusts the feature combination by executing the "remove feature" or "add feature" action. For example, in one iteration, the application found that after removing the "earliest order start time" feature, the AUC value of the risk control model further increased to 0.77, the KS value reached 0.4, and the F1-score reached 0.73. Finally, after multiple rounds of optimization, the fluctuation range of AUC, KS value and F1-score in 10 consecutive iterations was less than 0.01. The application determined that the risk control model was close to the optimal state and stopped training. At this time, the application obtained an optimal feature subset containing 12 features, the main features of which included "order quantity", "sales", "number of months from the last order to the current month", "number of historical bills overdue", "whether there is a current bill overdue", "coefficient of variation of order amount in the last 12 months", "order growth rate in the last 12 months compared to the past 13-24 months", etc. At this time, the AUC value of the risk control model reached 0.78, the KS value was 0.41, and the F1-score was 0.74, which met the performance requirements of the risk control model. Finally, the risk control model is deployed online and monitored.
[0155] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0156] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0157] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0158] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0159] Further references Figure 3 , as a response to the above Figure 2 In order to realize the method shown in the figure, the present application provides an embodiment of a feature screening device, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0160] like Figure 3 As shown, the feature screening device 200 of the embodiment of the present application includes:
[0161] The request acquisition module 210 is used to receive a feature screening request sent by a user terminal, wherein the feature screening request includes an original feature set to be screened;
[0162] A feature screening module 220 is used to perform a feature screening operation on the original feature set according to a multi-level feature screening mechanism to obtain a candidate feature set;
[0163] A hierarchical processing module 230 is used to perform hierarchical processing on the candidate feature set to obtain a hierarchical feature subset;
[0164] A key feature locking module 240 is used to perform key feature locking operations on the hierarchical feature subsets respectively to obtain key feature subsets;
[0165] A feature selection module 250 is used to perform feature selection operations on the key feature subsets according to a greedy algorithm to obtain feature selection subsets;
[0166] The risk control model training module 260 is used to call the initial risk control model and input the feature selection subsets into the initial risk control model to perform the risk control model training operation to obtain performance indicator data;
[0167] A feature optimization module 270 is used to perform feature optimization operations on the key feature subset according to the reward function and the performance indicator data to obtain target feature data;
[0168] The target feature output module 280 is used to output target feature data to the user terminal.
[0169] In an embodiment of the present application, a feature screening device 200 is provided, including: a request acquisition module 210, which is used to receive a feature screening request sent by a user terminal, wherein the feature screening request includes an original feature set to be screened; a feature screening module 220, which is used to perform a feature screening operation on the original feature set according to a multi-level feature screening mechanism to obtain a candidate feature set; a hierarchical processing module 230, which is used to perform hierarchical processing on the candidate feature set to obtain a hierarchical feature subset; a key feature locking module 240, which is used to perform a key feature locking operation on the hierarchical feature subsets respectively to obtain a key feature subset; a feature selection module 250, which is used to perform a feature selection operation on the key feature subsets respectively according to a greedy algorithm to obtain a feature selection subset; a risk control model training module 260, which is used to call the initial risk control model, and input the feature selection subsets into the initial risk control model for a risk control model training operation to obtain performance indicator data; a feature optimization module 270, which is used to perform a feature optimization operation on the key feature subset according to a reward function and performance indicator data to obtain target feature data; and a target feature output module 280, which is used to output the target feature data to the user terminal. Compared with the prior art, the present application can continuously optimize and maintain performance improvement when dealing with data fluctuations and nonlinear relationships between features. In particular, the present application needs to be able to dynamically optimize feature combinations based on real-time feedback, thereby improving screening efficiency and reducing reliance on preset rules.
[0170] In some optional implementations of the embodiments of the present application, the feature optimization module includes:
[0171] The penalty term calculation submodule is used to calculate the complexity penalty term R based on the key feature subset complexity , where the complexity penalty term R complexity It is expressed as:
[0172] R complexity = -α×N features
[0173] Among them, α represents the hyperparameter, N features The number of features representing the key feature subset;
[0174] The quantity optimization submodule is used to perform quantity optimization operations on the key feature subset according to the complexity penalty term to obtain the target feature data.
[0175] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of a computer device according to an embodiment of the present application.
[0176] The computer device 300 includes a memory 310, a processor 320, and a network interface 330 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 300 having components 310-330, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0177] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0178] The memory 310 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 310 can be an internal storage unit of the computer device 300, such as a hard disk or memory of the computer device 300. In other embodiments, the memory 310 can also be an external storage device of the computer device 300, such as a plug-in hard disk equipped on the computer device 300, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. Of course, the memory 310 can also include both the internal storage unit of the computer device 300 and its external storage device. In the embodiment of the present application, the memory 310 is generally used to store the operating system and various application software installed on the computer device 300, such as computer-readable instructions of the feature screening method, etc. In addition, the memory 310 can also be used to temporarily store various data that have been output or are to be output.
[0179] The processor 320 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 320 is generally used to control the overall operation of the computer device 300. In the embodiment of the present application, the processor 320 is used to run the computer-readable instructions or process data stored in the memory 310, such as computer-readable instructions for running the feature screening method.
[0180] The network interface 330 may include a wireless network interface or a wired network interface. The network interface 330 is generally used to establish a communication connection between the computer device 300 and other electronic devices.
[0181] The computer device provided by the present application can continuously optimize and maintain performance improvement when dealing with data fluctuations and nonlinear relationships between features. In particular, the present application is required to be able to dynamically optimize feature combinations based on real-time feedback, thereby improving screening efficiency and reducing dependence on preset rules.
[0182] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the feature screening method as described above.
[0183] The computer-readable storage medium provided by the present application can continuously optimize and maintain performance improvement when dealing with data fluctuations and nonlinear relationships between features. In particular, the present application is required to be able to dynamically optimize feature combinations based on real-time feedback, thereby improving screening efficiency and reducing dependence on preset rules.
[0184] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0185] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A feature screening method, characterized in that: The steps include: Receiving a feature screening request sent by a user terminal, wherein the feature screening request includes an original feature set to be screened; Performing a feature screening operation on the original feature set according to a multi-level feature screening mechanism to obtain a candidate feature set; Performing hierarchical processing on the candidate feature set to obtain a hierarchical feature subset; Performing key feature locking operations on the hierarchical feature subsets respectively to obtain key feature subsets; Perform feature selection operations on the key feature subsets according to a greedy algorithm to obtain feature selection subsets; Calling the initial risk control model, and inputting the feature selection subsets into the initial risk control model to perform risk control model training operations, and obtaining performance indicator data; Performing a feature optimization operation on the key feature subset according to the reward function and the performance indicator data to obtain target feature data; The target feature data is output to the user terminal.
2. The feature screening method according to claim 1, characterized in that: The step of performing a feature optimization operation on the key feature subset according to the reward function and the performance indicator data to obtain target feature data specifically includes the following steps: Calculate the complexity penalty term R based on the key feature subset complexity , where the complexity penalty term R complexity It is expressed as: R complexity =-α×N features Among them, α represents the hyperparameter, N features a number of features representing the subset of key features; A quantity optimization operation is performed on the key feature subset according to the complexity penalty item to obtain the target feature data.
3. The feature screening method according to claim 2, characterized in that: The performance indicator data includes an AUC indicator value, a KS indicator value, and an F1-score indicator value. The step of performing a quantity optimization operation on the key feature subset according to the complexity penalty term to obtain the target feature data specifically includes the following steps: The total reward function R of the key feature subset is calculated according to the complexity penalty term, the AUC index value, the KS index value, and the F1-score index value, wherein the total reward function R is expressed as: R=R AUC +R KS +R F1 +R complesity R AUC =(ΔAUC) 1.5 Among them, ΔAUC represents the performance improvement of the initial risk control model, R AUC represents the reward for the performance improvement ΔAUC, R KS and R F1 Respectively represent the rewards for improving the KS index value and the F1-score index value; A stability optimization operation is performed on the key feature subset according to the total reward function to obtain the target feature data.
4. The feature screening method according to claim 3, characterized in that: The step of performing a stability optimization operation on the key feature subset according to the total reward function to obtain the target feature data specifically includes the following steps: Storing the feature selection subset and the total reward function in an experience pool; Performing a random sampling operation in the experience pool to obtain a random sampling combination; Performing an update operation on the deep Q network according to the random sampling combination and the DQN algorithm to obtain a feature combination with a high reward; A feature optimization operation is performed on the high-reward feature combination according to the greedy algorithm to obtain the target feature data.
5. The feature screening method according to claim 4, characterized in that: The step of performing a feature optimization operation on the high-reward feature combination according to the greedy algorithm to obtain the target feature data specifically includes the following steps: After performing feature optimization operation on the high-reward feature combination according to the greedy algorithm in each round, the proportion ε of the greedy algorithm is decayed according to an exponential decay function, wherein the exponential decay function is expressed as: e new =e initial ×exp(-λ×t) Among them, ε initial represents the initial exploration ratio, λ represents the decay rate, and t represents the current iteration round; Perform feature optimization operations on the feature combination obtained in the previous round according to the greedy algorithm after attenuation processing; After performing a feature optimization operation on the feature combination obtained in the previous round according to the greedy algorithm of the minimum decay function, the target feature data is obtained.
6. The feature screening method according to claim 1, characterized in that: After the step of outputting the target feature data to the user terminal, the method further includes the following steps: Performing a risk control model training operation on the initial risk control model according to the target feature data to obtain current round performance indicator data; Determine whether the current round performance indicator data meets the risk control model performance conditions; If the current round of performance indicator data meets the performance conditions of the risk control model, the initial risk control model after the risk control model training is confirmed as the target risk control model, and the target risk control model is deployed and put online; If the current round of performance indicator data does not meet the performance conditions of the risk control model, the feature optimization operation is repeated on the key feature subset.
7. A feature screening device, characterized in that: include: A request acquisition module, configured to receive a feature screening request sent by a user terminal, wherein the feature screening request includes an original feature set to be screened; A feature screening module, used to perform a feature screening operation on the original feature set according to a multi-level feature screening mechanism to obtain a candidate feature set; A hierarchical processing module, used for performing hierarchical processing on the candidate feature set to obtain a hierarchical feature subset; A key feature locking module, used to perform key feature locking operations on the hierarchical feature subsets respectively to obtain key feature subsets; A feature selection module, used for performing feature selection operations on the key feature subsets according to a greedy algorithm to obtain feature selection subsets; A risk control model training module is used to call the initial risk control model and input the feature selection subset into the initial risk control model to perform a risk control model training operation to obtain performance indicator data; A feature optimization module, used to perform a feature optimization operation on the key feature subset according to the reward function and the performance indicator data to obtain target feature data; A target feature output module is used to output the target feature data to the user terminal.
8. The feature screening device according to claim 7, characterized in that: The feature optimization module includes: The penalty term calculation submodule is used to calculate the complexity penalty term R according to the key feature subset. complexity , where the complexity penalty term R complexity It is expressed as: R complexity =-α×N features Among them, α represents the hyperparameter, N features a number of features representing the subset of key features; The quantity optimization submodule is used to perform a quantity optimization operation on the key feature subset according to the complexity penalty term to obtain the target feature data.
9. A computer device comprising a memory and a processor, characterized in that: The memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the feature screening method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the feature screening method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Internet information service method and system based on cloud computing
CN120434270A