Inputted model feature selection method and apparatus, device, and storage medium
By constructing critical binning and comprehensively evaluating candidate features in combination with performance indicators, the problem in the existing technology that it is difficult to evaluate the performance of binning points and nearby values in the process of selecting model features is solved, and the accuracy and stability of the model are improved.
Patent Information
- Application Number
- PCT/CN2024/082589
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-10
- Filing Date
- 2024-03-20
- Publication Date
- 2024-10-17
AI Technical Summary
It is difficult to accurately evaluate the binning point and the value performance near the binning point when selecting features for molding in the existing technology, resulting in a decrease in the accuracy of the model.
By constructing critical binning and combining the performance indicators of the original binning and critical binning, the molding performance of the candidate features is comprehensively evaluated and the molding features are selected.
It improves the effectiveness of feature selection and the accuracy and stability of the model, especially in linear models such as logistic regression, which enhances the classification accuracy of adversarial samples without the need for data offset determination and original binning adjustment.
Smart Images

Figure CN2024082589_17102024_PF_FP_ABST
Abstract
Description
Method, device, equipment and storage medium for selecting mold features
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202310383618.X, filed on April 10, 2023, entitled “Mold Feature Selection Method, Device, Equipment and Storage Medium,” the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present application relates to the field of big data processing, and in particular to a method, device, equipment and storage medium for selecting input features. Background Art
[0004] With the continuous development of artificial intelligence technology, trained models are increasingly being used to lead or assist in the completion of business operations. Model performance, such as accuracy and stability, is closely related to the input features used in model training. To select appropriate input features, feature values can be binned. The performance of the feature in each bin determines whether it should be used as an input feature for model training. However, this approach makes it difficult to evaluate the performance of feature values at or near binning points, leading to deficiencies in the input feature selection process and, consequently, reduced accuracy of the model trained using these selected input features.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a method, device, equipment and storage medium for selecting input features, which can improve the effectiveness of input feature selection, thereby improving the accuracy of the model trained using the selected input features.
[0007] In a first aspect, an embodiment of the present application provides a method for selecting input features, including: obtaining candidate features, original binning points of original bins including feature data of the candidate features and values of the candidate features; constructing critical bins based on the original binning points, and the critical bins are obtained by expanding the original binning points to the corresponding two adjacent original bins; obtaining a first input performance index based on the values of the candidate features in the feature data and the critical bins, the first input performance index including the input performance index of the candidate features in the critical bins; selecting input features from the candidate features based on the first input performance index of the candidate features and a second input performance index of the candidate features obtained in advance, the second input performance index including the input performance index of the candidate features in the original bins.
[0008] In a second aspect, an embodiment of the present application provides a device for selecting input features, including: an acquisition module for acquiring candidate features, original binning points of original bins including feature data of candidate features and values of candidate features; a binning construction module for constructing critical bins based on the original binning points, the critical bins being obtained by expanding the original binning points to the corresponding two adjacent original bins; an index calculation module for obtaining a first input performance index based on the values of the candidate features in the feature data and the critical bins, the first input performance index including the input performance index of the candidate features in the critical bins; a selection module for selecting input features from the candidate features based on the first input performance index of the candidate features and a second input performance index of the candidate features obtained in advance, the second input performance index including the input performance index of the candidate features in the original bins.
[0009] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the input feature selection method of the first aspect is implemented.
[0010] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method for selecting input features of the first aspect is implemented.
[0011] The embodiments of the present application provide a method, apparatus, device and storage medium for selecting input features. The method can be based on the original binning point of the original binning of the candidate feature, expand the original binning point to the corresponding two adjacent original bins to obtain a critical binning, obtain the first input performance index of the candidate feature in the critical binning according to the value of the candidate feature in the feature data and the critical binning, and select the input feature from the candidate features based on the first input performance index and the second input performance index of the candidate feature. Since the original binning point and the values near the original binning point are in the critical binning, the first input performance index can reflect the performance of the candidate feature in the critical binning, so the first input performance index can be used to make up for the lack of evaluation of the values of the second input performance index at the original binning point and the values near the original binning point that reflect the performance of the candidate feature in the original binning. The combination of the first input performance index and the second input performance index can more completely and accurately evaluate the candidate features, improve the selection process of the input features, improve the effectiveness of the selection of the input features, and thus improve the accuracy of the model trained using the selected input features. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0013] FIG1 is a flow chart of a method for selecting mold features according to an embodiment of the present application;
[0014] FIG2 is a schematic diagram of an example of original binning and critical binning provided in an embodiment of the present application
[0015] FIG3 is a flow chart of a method for selecting mold features according to another embodiment of the present application;
[0016] FIG4 is a flow chart of a method for selecting mold features according to another embodiment of the present application;
[0017] FIG5 is a flow chart of a method for selecting mold features according to another embodiment of the present application;
[0018] FIG6 is a flow chart of an example of a mold feature selection process provided in an embodiment of the present application;
[0019] FIG7 is a schematic structural diagram of a mold input feature selection device provided in one embodiment of the present application;
[0020] FIG8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0022] With the continuous advancement of artificial intelligence technology, trained models are increasingly being used to drive or assist in the completion of business operations. Model performance, such as accuracy and stability, is closely related to the input features used in model training. To select appropriate input features, feature values can be binned. The performance of a feature in each bin determines whether it should be used as an input feature for model training. However, the binning points and the values near these points are close to the bin edges, making it difficult to evaluate the performance of the feature at these points. Consequently, the performance evaluation of the feature is imprecise, leading to deficiencies in the input feature selection process and, consequently, reduced accuracy of the model trained using the selected input features.
[0023] The present application provides a method, apparatus, device and storage medium for selecting input features, which can construct critical bins based on the binning points of the original bins, where the binning points and the values near the binning points are located in the middle of the critical bins, obtain the evaluation of the feature in the critical bins, and jointly determine the input features through the evaluation of the feature in the original bins and the evaluation of the feature in the critical bins, thereby compensating for the shortcomings caused by the performance loss of the binning points and the values near the binning points in the input feature selection process, improving the effectiveness of the input feature selection, and thereby improving the performance of the model trained using the selected input features, such as accuracy and stability.
[0024] The following describes the method, device, equipment and storage medium for selecting mold features provided in this application.
[0025] In a first aspect, the present application provides a method for selecting input features for model training. The method can be performed by an input feature selection device, an electronic device, etc., without limitation herein. FIG1 is a flowchart of the input feature selection method provided in one embodiment of the present application. As shown in FIG1 , the input feature selection method can include steps S101 to S104.
[0026] In step S101 , a candidate feature, feature data of the candidate feature, and original binning points of original bins of values of the candidate feature are obtained.
[0027] Candidate features include features that are candidate options for model input features. In an embodiment of the present application, candidate features may include continuous features and / or discontinuous features with a large number of discrete values. Model input features are features used for model training. Feature data includes candidate features. In some examples, feature data may also include other data, which is not limited here. Each feature data may reflect the corresponding business, user, etc., which is not limited here. The values of the same candidate feature corresponding to different businesses and different users may be different or the same.
[0028] Original bins are the original bins for the candidate features. Original bins can be obtained through equal frequency binning, equal distance binning, cluster binning, and other methods. The binning method is not limited here. Original bin points include bin points between original bins. Bin points are the boundary points between two consecutive bins. Each original bin point corresponds to two adjacent original bins. For example, four original bins are obtained by using the equal-frequency binning method, and the four original bins are [0, 300), [300, 800), [800, 2500), and [2500, 10000). Then the four original bins produce three original bin points, which are 300, 800, and 2500. The two adjacent original bins corresponding to the original bin point 300 include [0, 300) and [300, 800), the two adjacent original bins corresponding to the original bin point 800 include [300, 800), [800, 2500), and the two adjacent original bins corresponding to the original bin point 800 include [800, 2500), [2500, 10000).
[0029] In step S102 , critical bins are constructed based on the original bin points.
[0030] The critical bin is obtained by expanding the original bin point to the corresponding two adjacent original bins, so that the original bin point and the values near the original bin point are located in the middle of the critical bin. The original bin point can be used as a reference point to start expanding to both sides to obtain the critical bin. Figure 2 is a schematic diagram of an example of original bins and critical bins provided in an embodiment of the present application. The black dots in Figure 2 are original bin points. As shown in Figure 2, the original bins include areas A1, A2, A3 and A4, and the critical bins include areas B1, B2 and B3. The lower limit value of the critical bin can be the cutoff value of the expansion from the original bin point to the relatively front original bin in the corresponding two adjacent original bins, and the upper limit value of the critical bin can be the cutoff value of the expansion from the original bin point to the relatively back original bin in the corresponding two adjacent original bins. For example, the original bin point is 300, and the two adjacent original bins corresponding to the original bin point 300 include [0, 300) and [300, 800). The critical bin obtained from the original bin point can be [280, 330).
[0031] In step S103, a first input performance index is obtained based on the values of the candidate features and critical binning in the feature data.
[0032] The first modeling performance index includes the modeling performance index of the candidate feature in the critical bin. The modeling performance index can characterize the performance of the feature for training the model. The performance may include predictive ability, stability, discrimination ability, difference, etc. The types of modeling performance indicators are not limited here. The modeling performance indicators that can characterize the performance of the feature for training the model are all within the protection scope of the embodiments of the present application. For example, the modeling performance index may include one or more of the following: Information Value (IV), Population Stability Index (PSI), KS (i.e. Kolmogorov-Smirnov) statistic, Area Under Curve (AUC). Information value can measure the category discrimination ability of a single feature in each bin. Population stability index can measure whether there is a significant difference in the category distribution of two data sets in each bin. KS statistic and area under the curve can measure the category discrimination ability of the feature. The embodiments of the present application are compatible with modeling evaluation indicators of various features.
[0033] In step S104 , a mold-in feature is selected from the candidate features based on the first mold-in performance index of the candidate feature and the second mold-in performance index of the candidate feature obtained in advance.
[0034] The second mold entry performance index includes the mold entry performance index of the candidate feature in the original bin. The specific content of the mold entry performance index can be found above and will not be repeated here.
[0035] The first input performance index can represent the input performance of a candidate feature in a critical bin, and the second input performance index can represent the input performance of a candidate feature in an original bin. The first input performance index can compensate for the values at or near the original bin points that are difficult for the second input performance index to evaluate. In some examples, a comprehensive input performance index can be derived based on the first and second input performance indicators, and used to determine whether a candidate feature should be selected as an input feature. Combining the first and second input performance indicators to jointly determine the input feature from a candidate can improve the effectiveness of input feature selection.
[0036] In an embodiment of the present application, a critical bin can be obtained by expanding the original bin point to the corresponding two adjacent original bins based on the original bin point of the original bin of the candidate feature, and a first input performance index of the candidate feature in the critical bin is obtained according to the value of the candidate feature in the feature data and the critical bin. The input feature is selected from the candidate features based on the first input performance index and the second input performance index of the candidate feature. Since the original bin point and the values near the original bin point are in the critical bin, the first input performance index can reflect the performance of the candidate feature in the critical bin. Therefore, the first input performance index can be used to make up for the lack of evaluation of the values of the second input performance index at the original bin point and the values near the original bin point that reflect the performance of the candidate feature in the original bin. The combination of the first input performance index and the second input performance index can more completely and accurately evaluate the candidate feature, improve the selection process of the input feature, and improve the effectiveness of the selection of the input feature, thereby improving the accuracy and stability of the model trained using the selected input feature. In particular, in linear model application scenarios such as logistic regression, the classification accuracy of the model trained using the selected input feature on adversarial samples can also be enhanced.
[0037] Furthermore, the input feature selection method in the embodiment of the present application does not require data offset determination for the original bins, does not adjust the evaluation of features in the original bins, and does not require modification of the evaluation process for the original bins. This method can achieve superior results while minimizing the impact on the original architecture of input feature selection. The input feature selection method in the embodiment of the present application can be applied in federated modeling scenarios. The determination of input features does not require additional model training, which can reduce overhead, particularly in federated modeling scenarios.
[0038] In some embodiments, a critical bin can be constructed by expanding from the original bin point to the corresponding two adjacent original bins according to a certain ratio. FIG3 is a flowchart of a method for selecting input features according to another embodiment of the present application. FIG3 differs from FIG1 in that step S102 in FIG1 can be specifically refined into steps S1021 to S1023 in FIG3.
[0039] In step S1021, according to a preset first ratio, the first range is obtained by expanding from the original bin point to a corresponding adjacent original bin.
[0040] The first ratio is the ratio of the first range to the range of a corresponding adjacent original bin. It can be set based on specific scenarios, needs, experience, etc. and is not limited here. In some examples, the first ratio can be less than or equal to 10%. The first range is a portion of the original bin corresponding to the original bin point.
[0041] In step S1022, according to a preset second ratio, the second range is obtained by expanding from the original bin point to another corresponding adjacent original bin point.
[0042] The second ratio is the ratio of the second range to the range of the corresponding adjacent original bin. It can be set based on specific scenarios, needs, experience, etc. and is not limited here. In some examples, the second ratio can be less than or equal to 10%. The second range is a portion of the original bin corresponding to the original bin point. The second ratio can be the same as or different from the first ratio and is not limited here.
[0043] If the first range is a portion of the original binning point corresponding to the relatively preceding original bin of the two adjacent original bins, that is, the original binning point is the right endpoint of the relatively preceding original bin, the second range is a portion of the original binning point corresponding to the relatively following original bin of the two adjacent original bins, that is, the original binning point is the left endpoint of the relatively following original bin. Alternatively, if the first range is a portion of the original binning point corresponding to the relatively following original bin of the two adjacent original bins, that is, the original binning point is the left endpoint of the relatively following original bin, the second range is a portion of the original binning point corresponding to the relatively preceding original bin of the two adjacent original bins, that is, the original binning point is the right endpoint of the relatively following original bin.
[0044] In step S1023 , the first range and the second range are merged to obtain a critical bin.
[0045] For ease of understanding, the following example illustrates the first range, the second range, and the critical bin. If two adjacent original bins are [a i-1 , a i ) and [a i , a i+1 ), then the original bin point a i The left and right endpoints of the corresponding critical bins can be obtained according to the following formulas (1) and (2): i =a i -p×(a i -a i-1 ) (1) ra i =a i +q×(a i+1 -a i ) (2)
[0046] Among them, a i is the original binning point; la i is the original bin point a iThe left endpoint of the corresponding critical bin; ra i is the original bin point a i The right endpoint of the corresponding critical bin; p is the first ratio; q is the second ratio. According to the above formulas (1) and (2), the first range is [la i , a i ), the second range is [a i ,ra i ), and the original bin point a i The corresponding critical bin is [la i ,ra i ).
[0047] For example, if the four consecutive original bins are [0, 300), [300, 800), [800, 2500), and [2500, 10000), the first ratio and the second ratio are the same and are both 5%. According to the above formulas (1) and (2), the critical bin corresponding to the original bin point 300 is [285, 325), the critical bin corresponding to the original bin point 800 is [775, 885), and the critical bin corresponding to the original bin point 2500 is [2415, 2875).
[0048] In some embodiments, a first mold entry performance indicator can be obtained based on the number of feature data whose candidate feature values fall into critical bins. FIG4 is a flowchart of a mold entry feature selection method provided in another embodiment of the present application. FIG4 differs from FIG1 in that step S103 in FIG1 can be specifically refined into steps S1031 and S1032 in FIG4.
[0049] In step S1031 , based on the values of the candidate features in the feature data and the critical bins, the number of feature data in which the values of the candidate features are in the critical bins is obtained.
[0050] Among a large amount of feature data, some feature data has candidate feature values that fall within critical bins. If a candidate feature value falls within a critical bin, the feature data can be considered to belong to that critical bin, and the number of feature data belonging to each critical bin can be counted. The number of feature data whose candidate feature values fall within a critical bin is the number of feature data belonging to the critical bin. A piece of feature data can include data for a single user or data from a single transaction performed by a user, without limitation.
[0051] In some examples, the feature data has a classification label, which is used to indicate the classification result of the feature data. The classification result corresponds to the classification result that the model can support, and the classification result indicated by the classification label of the feature data is the actual classification result. The number of feature data whose values of the candidate feature are in the critical bin may include the number of feature data with the same classification label in the critical bin. For example, the number of feature data in the critical bin B1 is 100. Among these 100 feature data, the number of feature data with the classification label of "category 1" is 65, and the number of feature data with the classification label of "category 2" is 35. If each feature data includes the data of one user, it can be considered that the number of users belonging to the critical bin B1 is 100. Among the 100 users belonging to the critical bin B1, the classification label of the feature data of 65 users is "category 1", and the classification label of the feature data of 35 users is "feature 2".
[0052] In step S1032, a first input performance index is obtained based on the number of feature data whose values of the candidate features are in the critical bins.
[0053] The first input performance index of the candidate feature can characterize the performance of the candidate feature for training the model, and the relationship between the number of feature data in the critical bin can be used to determine the distinguishing ability, stability and other performance of the candidate feature in the critical bin.
[0054] In some embodiments, the feature data has a classification label. A detailed description of the classification label is provided above and is not repeated here. A first number of feature data with the same classification label in the feature data in the critical bin is obtained; a second number of feature data with the same classification label in the feature data is obtained; and a first mold input performance indicator is obtained based on the first number and the second number.
[0055] For the feature data in any critical bin, the feature data under each classification label in the critical bin can be obtained, and the number of feature data under each classification label in the critical bin can be counted. The first number includes the number of feature data under each classification label in the critical bin. The second number can be the total number of feature data under the same classification label in all critical bins. The first mold input performance indicator can be obtained by using the proportional relationship between the first number and the second number corresponding to each classification label.
[0056] In some examples, the classification label includes a first classification label and a second classification label, and the first classification label and the second classification label each indicate a different classification result. A first ratio of a first quantity corresponding to the first classification label and a second quantity corresponding to the first classification label can be obtained; a second ratio of a first quantity corresponding to the second classification label and a second quantity corresponding to the second classification label can be obtained; and a first modeling performance indicator can be obtained based on the first ratio and the second ratio. For example, the first modeling performance indicator includes information value, and the classification label of the feature data includes a first classification label and a second classification label, the first classification label represents "category 1", and the second classification label represents "category 2". Then, the information value of the candidate feature in the i-th critical bin can be obtained according to the following formula (3):
[0057] Among them, TIV i is the information value of the candidate feature in the i-th critical bin; G i is the first number of feature data with the first classification label in the i-th critical bin; G is the second number of feature data with the first classification label in all feature data; B i is the first number of feature data with the second classification label in the i-th critical bin; B is the second number of feature data with the second classification label in all feature data; is the first ratio; is the second ratio.
[0058] For another example, the first input performance index includes a group stability index, and the classification labels of the feature data include a first classification label and a second classification label. The first classification label represents "category 1" and the second classification label represents "category 2". Then the group stability index of the candidate feature in the i-th critical bin can be obtained according to the following formula (4):
[0059] Among them, TPSI i is the population stability index of the candidate feature in the i-th critical bin; G i is the first number of feature data with the first classification label in the i-th critical bin; G is the second number of feature data with the first classification label in all feature data; d1 is the expected proportion of feature data with the first classification label in the feature data; B i is the first number of feature data with the second classification label in the i-th critical bin; B is the second number of feature data with the second classification label in all feature data; d1 is the expected proportion of feature data with the second classification label in the feature data; is the first ratio; is the second ratio.
[0060] The calculation of other types of first mold-in-mold performance indicators is similar and can be obtained according to the calculation method of the mold-in-mold performance indicator itself, which will not be described in detail here.
[0061] The classification labels of the feature data are not limited to two, but can be greater than two, that is, the classification results of the feature data can be greater than two. In some examples, the classification labels include the first classification label to the Nth classification label, N is an integer greater than 2, and the classification results indicated by the first classification label to the Nth classification label are different. According to the ratio of the first quantity and the second quantity corresponding to each two classification labels from the first classification label to the Nth classification label, the mold performance factor item corresponding to each two classification labels can be calculated; the sum of the mold performance factor items corresponding to each two classification labels from the first classification label to the Nth classification label is determined as the first mold performance index. For example, the first mold performance index includes information value, and the classification labels of the feature data include the first classification label to the Nth classification label, and the first classification label to the Nth classification label represent "category 1" to "category N" respectively, then the information value of the candidate feature in the i-th critical bin can be obtained according to the following formula (5):
[0062] Among them, TIV i is the information value of the candidate feature in the i-th critical bin; G ij is the first number of feature data with the jth classification label in the i-th critical bin; G j is the second number of feature data whose classification label is the jth classification label in all feature data; G ik is the first number of feature data with the kth classification label in the i-th critical bin; G k is the second number of feature data whose classification label is the kth classification label in all feature data; is the modeling performance factor item corresponding to the j-th classification label and the k-th classification label.
[0063] When there are more than two classification labels, the calculation of other types of first mold entry performance indicators is similar and can be obtained according to the calculation method of the mold entry performance indicator itself, which will not be described in detail here.
[0064] In some embodiments, the first and second mold-entry performance indicators can be combined with their respective weights to obtain a comprehensive mold-entry performance indicator for the candidate feature. Figure 5 is a flowchart of a mold-entry feature selection method provided in another embodiment of the present application. The difference between Figure 5 and Figure 1 is that step S104 in Figure 1 can be specifically refined into steps S1041 to S1043 in Figure 5.
[0065] In step S1041 , a first weight of the first mold-input performance indicator and a second weight of the second mold-input performance indicator are obtained.
[0066] The first weight is the weight corresponding to the first input performance indicator. The second weight is the weight corresponding to the second input performance indicator. The sum of the first and second weights is 1. The first and second weights can be set based on the input feature requirements, the usage scenarios of the input features, the requirements of the model used to train the input features, the usage scenarios of the model used to train the input features, experience, and other factors, and are not limited here.
[0067] In step S1042, a weighted algorithm is used to obtain a comprehensive mold-input performance index of the candidate feature according to the first mold-input performance index, the first weight, the second mold-input performance index and the second weight.
[0068] The comprehensive modeling performance index can represent the comprehensive performance of the candidate feature when it is taken in the critical bins and the original bins. Specifically, the first modeling performance index corresponding to each critical bin can be summed to obtain a first sum; the second modeling performance index corresponding to each original bin can be summed to obtain a second sum; and the comprehensive modeling performance index can be calculated using the first sum, the first weight, the second sum, and the second weight. For example, the comprehensive modeling performance index includes information value, and the comprehensive modeling performance index can be obtained according to the following formula (6):
[0069] Among them, IV is; α is the second weight; IV i is the second modeling performance index corresponding to the i-th original bin; 1-α is the first weight; TIV i is the first mold performance index corresponding to the i-th critical bin.
[0070] In step S1043, based on the comprehensive mold-in performance index, a mold-in feature is selected from the candidate features.
[0071] Candidate features whose comprehensive modeling performance indicators meet preset selection criteria can be selected as modeling features. The preset selection criteria can be set based on the type of comprehensive modeling performance indicator, scenario, requirements, experience, etc., and are not limited here. For example, the comprehensive modeling performance indicator includes information value. A higher information value indicates a higher discriminatory performance of the candidate feature. The preset selection criteria can include the comprehensive modeling performance indicator being greater than or equal to a preset information value threshold. The preset information value threshold can be set based on the scenario, requirements, experience, etc., and are not limited here. For example, the preset information value threshold can be 0.5. For another example, the comprehensive modeling performance indicator includes a population stability index. A lower population stability index indicates a higher stability of the candidate feature. The preset selection criteria can include the comprehensive modeling performance indicator being less than or equal to a preset population stability index threshold. The preset population stability index threshold can be set based on the scenario, requirements, experience, etc., and are not limited here. For example, the preset population stability index threshold can be 0.1. The number of modeling features selected can also be limited. When the number of modeling features reaches the preset requirement, feature selection is terminated.
[0072] In some examples, candidate features may be selected as features to be included in the mold in descending order of performance as represented by the comprehensive mold-input performance index until a preset termination condition is met. The preset termination condition may include: the comprehensive mold-input performance index meeting a preset selection condition, and / or the number of features to be included meeting a preset requirement.
[0073] When the performance of multiple candidate features represented by the comprehensive modeling performance indicators differ, the candidate features with relatively higher performance represented by the comprehensive modeling performance indicators are preferentially selected. For example, when the comprehensive modeling performance indicators include information value, the greater the information value, the higher the discriminative performance of the candidate feature. The candidate features can be arranged in descending order of information value, and the modeling features can be selected in this order. For another example, when the comprehensive modeling performance indicators include a group stability indicator, the smaller the group stability indicator, the higher the stability performance of the candidate feature. The candidate features can be arranged in ascending order of the group stability indicator, and the modeling features can be selected in this order.
[0074] The preset requirements may include that the number of input features reaches a preset number, or that the candidate features are empty, etc. The preset requirements may also include other requirements, which are not limited here. For example, in descending order of performance as represented by the comprehensive input performance index, input features are selected according to preset selection conditions. When the number of selected input features reaches the preset number, further input feature selection is stopped, and the model can be trained using the selected input features. For another example, in descending order of performance as represented by the comprehensive input performance index, input features are selected according to preset selection conditions until the number of unselected candidate features is empty.
[0075] In some examples, before the preset termination condition is met, if the comprehensive modeling performance index of the candidate feature meets the preset selection condition and the difference between the comprehensive modeling performance index of the previous modeling feature and the previous modeling feature is less than the preset difference threshold, the correlation parameter between the candidate feature and the previous modeling feature is obtained; if the correlation parameter exceeds the preset correlation range, the candidate feature is determined as a non-modeling feature.
[0076] The comprehensive modeling performance index of the candidate feature meets the preset selection conditions, indicating that the candidate feature can be used as a modeling feature. The difference between the comprehensive modeling performance index of the candidate feature and the previous modeling feature is less than the preset difference threshold, indicating that the difference between the candidate feature and the previous selected modeling feature is small, and there may be a strong correlation between the two. It is necessary to further detect the correlation between the candidate feature and the previous modeling feature. The preset difference threshold is used to screen candidate features that need to be tested for correlation. It can be set according to scenarios, needs, experience, etc., and is not limited here. For example, the preset difference threshold is 10 -5 . The correlation parameter can characterize the correlation. The preset correlation range is used to screen out candidate features that are too strongly correlated with the previous input feature. It can be set according to scenarios, needs, experience, etc. and is not limited here. Non-input features are candidate features that are not input features, that is, they include candidate features that are screened out using the preset correlation range. In some cases, the correlation parameter is positively correlated with the correlation, that is, the larger the correlation parameter, the stronger the correlation. For example, the Pearson correlation coefficient is used to test the correlation between the candidate feature and the previous input feature. If the correlation parameter is higher than 0.7, it means that the candidate feature has a strong positive correlation with the previous input feature, and the candidate feature is determined to be a non-input feature. In some cases, the correlation parameter is negatively correlated with the correlation, that is, the smaller the correlation parameter, the stronger the correlation. For example, the Pearson correlation coefficient is used to test the correlation between the candidate feature and the previous input feature. If the correlation parameter is lower than -0.7, it means that the candidate feature has a strong negative correlation with the previous input feature, and the candidate feature is determined to be a non-input feature.
[0077] By testing the correlation parameters, the selection of input features can be further optimized, the effectiveness and adaptability of the input feature selection can be improved, and thus the accuracy of the model trained using the input features can be improved.
[0078] In the embodiments of the present application, the issue of missing input performance evaluation near the original binning point in the original binning method can be resolved by simply adding one or two hyperparameters and a first weight corresponding to the first input performance indicator. If the first and second ratios are the same, this can be considered as adding only one hyperparameter; if the first and second ratios are different, this can be considered as adding only two hyperparameters.
[0079] For ease of understanding, the following example illustrates the process of the above-mentioned mold feature selection method. FIG6 is a flowchart of an example of the mold feature selection process provided by an embodiment of the present application. As shown in FIG6 , the mold feature selection process may include steps S201 to S209.
[0080] In step S201 , the composition of the input performance index, the candidate features, and the original bins corresponding to the candidate features are determined.
[0081] In step S202 , critical bins are constructed based on the original binning points of the original bins.
[0082] In step S203 , the mold entry performance index of the candidate feature in the critical bin and the mold entry performance index in the original bin are calculated.
[0083] In step S204, the comprehensive mold entry performance index of the candidate feature is calculated based on the mold entry performance index of the candidate feature in the critical bin and the weight corresponding to the mold entry performance index in the original bin.
[0084] In step S205, it is determined whether the calculation of the comprehensive mold-input performance index of all candidate features is completed. If completed, step S206 is executed; if not, the process returns to step S202.
[0085] In step S206, the candidate features are arranged in the order of the comprehensive mold performance index.
[0086] In step S207 , the input features are screened, and candidate features that are highly correlated with the previous input features are eliminated.
[0087] In step S208, it is determined whether a preset termination condition is satisfied. If so, step S209 is executed; if not, the process returns to step S207.
[0088] In step S209, the selection of the mold-in feature is stopped, and the selected mold-in feature is obtained.
[0089] The specific contents of the above steps S201 to S209 can be found in the relevant descriptions in the above embodiments, which will not be repeated here.
[0090] The method for selecting input features in the above embodiment can be used to select input features in various scenarios. For example, it can be applied to scenarios such as default judgment, risk management, and fault identification, which are not limited here.
[0091] It should be noted that the acquisition, storage, use, and processing of information and data in the embodiments of this application are authorized by users or relevant institutions and comply with relevant provisions of national laws and regulations.
[0092] A second aspect of the present application provides a mold feature selection device. FIG7 is a schematic diagram of the structure of the mold feature selection device provided in one embodiment of the present application. As shown in FIG7 , the mold feature selection device 300 may include an acquisition module 301, a binning module 302, an indicator calculation module 303, and a selection module 304.
[0093] The acquisition module 301 may be used to acquire candidate features, including feature data of the candidate features and original binning points of original bins of values of the candidate features.
[0094] The bin construction module 302 may be used to construct critical bins based on the original bin points. The critical bins are obtained by expanding the original bin points to two corresponding adjacent original bins.
[0095] The index calculation module 303 can be used to obtain a first input performance index based on the values of candidate features and critical bins in the feature data.
[0096] The first mold entry performance index includes a mold entry performance index of the candidate feature in a critical bin.
[0097] The selection module 304 may be configured to select a mold-entry feature from the candidate features based on a first mold-entry performance index of the candidate feature and a second mold-entry performance index of the candidate feature obtained in advance.
[0098] The second mold entry performance index includes the mold entry performance index of the candidate feature in the original bin.
[0099] In some examples, the modeling performance indicators may include one or more of the following: information value, population stability index, KS statistic, and area under the curve.
[0100] In an embodiment of the present application, based on the original binning point of the original binning of the candidate feature, the original binning point can be expanded to the corresponding two adjacent original bins to obtain a critical binning, and according to the value of the candidate feature in the feature data and the critical binning, the first input performance index of the candidate feature in the critical binning is obtained, and the input feature is selected from the candidate features based on the first input performance index and the second input performance index of the candidate feature. Since the original binning point and the values near the original binning point are in the critical binning, the first input performance index can reflect the performance of the candidate feature in the critical binning, so the first input performance index can be used to make up for the lack of evaluation of the values of the second input performance index at the original binning point and the values near the original binning point that reflect the performance of the candidate feature in the original binning. The combination of the first input performance index and the second input performance index can more completely and accurately evaluate the candidate feature, improve the selection process of the input feature, improve the effectiveness of the selection of the input feature, and thus improve the security and stability of the model trained using the selected input feature. In particular, in linear model application scenarios such as logistic regression, the classification accuracy of the model trained using the selected input feature on adversarial samples can also be enhanced.
[0101] Furthermore, the input feature selection method in the embodiment of the present application does not require data offset determination for the original bins, does not adjust the evaluation of features in the original bins, and does not require modification of the evaluation process for the original bins. This method can achieve superior results while minimizing the impact on the original architecture of input feature selection. The input feature selection method in the embodiment of the present application can be applied in federated modeling scenarios. The determination of input features does not require additional model training, which can reduce overhead, particularly in federated modeling scenarios.
[0102] In some embodiments, the binning construction module 302 can be used to: expand from the original binning point to a corresponding adjacent original bin according to a preset first ratio to obtain a first range, where the first ratio is the ratio of the first range to the range of the corresponding adjacent original bin; expand from the original binning point to another corresponding adjacent original bin according to a preset second ratio to obtain a second range, where the second ratio is the ratio of the second range to the range of another corresponding adjacent original bin; and merge the first range and the second range to obtain a critical bin.
[0103] In some examples, the first ratio is less than or equal to 10%, and the second ratio is less than or equal to 10%.
[0104] In some embodiments, the indicator calculation module 303 can be used to: obtain the number of feature data whose values of the candidate features are in the critical bins based on the values of the candidate features in the feature data and the critical bins; and obtain the first input performance indicator based on the number of feature data whose values of the candidate features are in the critical bins.
[0105] In some examples, the feature data has a classification label that indicates a classification result of the feature data. The indicator calculation module 303 may be configured to: obtain a first number of feature data with the same classification label in the feature data in the critical bin; obtain a second number of feature data with the same classification label in the feature data; and obtain a first input performance indicator based on the first number and the second number.
[0106] In some examples, the classification labels include a first classification label and a second classification label, and the first classification label and the second classification label each indicate a different classification result. The indicator calculation module 303 may be configured to: obtain a first ratio of a first quantity corresponding to the first classification label to a second quantity corresponding to the first classification label; obtain a second ratio of a first quantity corresponding to the second classification label to a second quantity corresponding to the second classification label; and obtain a first mold entry performance indicator based on the first ratio and the second ratio.
[0107] In some examples, the classification labels include first through Nth classification labels, where N is an integer greater than 2, and each of the first through Nth classification labels indicates a different classification result. The index calculation module 303 may be configured to: calculate, based on a ratio of a first quantity to a second quantity corresponding to every two classification labels from the first through Nth classification labels, obtain a mold entry performance factor item corresponding to each two classification labels; and determine the sum of the mold entry performance factor items corresponding to every two classification labels from the first through Nth classification labels as a first mold entry performance index.
[0108] In some embodiments, the selection module 304 can be used to: obtain a first weight of the first input molding performance indicator and a second weight of the second input molding performance indicator; obtain a comprehensive input molding performance indicator of the candidate feature using a weighted algorithm based on the first input molding performance indicator, the first weight, the second input molding performance indicator and the second weight; and select the input molding feature from the candidate features based on the comprehensive input molding performance indicator.
[0109] In some examples, the selection module 304 may be configured to determine candidate features as mold-in features in descending order of performance represented by the comprehensive mold-in performance index until a preset termination condition is met.
[0110] In some examples, the selection module 304 can also be used to: before the preset termination condition is met, if the comprehensive mold performance index of the candidate feature meets the preset selection condition and the difference between the comprehensive mold performance index of the previous mold feature and the previous mold feature is less than the preset difference threshold, then obtain the correlation parameter between the candidate feature and the previous mold feature; if the correlation parameter exceeds the preset correlation range, determine the candidate feature as a non-mold feature.
[0111] A third aspect of the present application provides an electronic device. FIG8 is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. As shown in FIG8 , the electronic device 400 includes a memory 401, a processor 402, and a computer program stored in the memory 401 and executable on the processor 402.
[0112] In some examples, the processor 402 may include a central processing unit (CPU) or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0113] The memory 401 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method for selecting features for the input mold according to the embodiment of the present application.
[0114] The processor 402 reads the executable program code stored in the memory 401 to run a computer program corresponding to the executable program code, so as to implement the input feature selection method in the above embodiment.
[0115] In some examples, the electronic device 400 may further include a communication interface 403 and a bus 404. As shown in FIG8 , the memory 401, the processor 402, and the communication interface 403 are connected via the bus 404 and communicate with each other.
[0116] The communication interface 403 is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. Input devices and / or output devices can also be connected through the communication interface 403.
[0117] The bus 404 includes hardware, software, or both that couples the components of the electronic device 400 to each other. By way of example, and not limitation, the bus 404 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of the above. Where appropriate, the bus 404 may include one or more buses. Although embodiments herein describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.
[0118] In a fourth aspect, the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method for selecting features to be selected in the mold described in the above-mentioned embodiment can be implemented, and the same technical effects can be achieved. To avoid repetition, the above-mentioned computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which is not limited here.
[0119] The present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device can perform the input feature selection method of the above embodiment and achieve the same technical effect. To avoid repetition, the above description will not be repeated here.
[0120] It should be understood that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For device embodiments, equipment embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the relevant parts can be referred to the description section of the method embodiment. This application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications and additions, or change the order of the steps after understanding the spirit of this application. In addition, for the sake of brevity, a detailed description of known method technologies is omitted here.
[0121] Aspects of the present application have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed via the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. This processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or the flowchart and the combination of the boxes in the block diagram and / or the flowchart can also be implemented by the dedicated hardware that performs the specified function or action, or can be implemented by the combination of dedicated hardware and computer instructions.
[0122] Those skilled in the art should understand that the above embodiments are exemplary rather than restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on a study of the drawings, the specification and the claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other devices or steps; the quantifier "one" does not exclude a plurality; the terms "first" and "second" are used to identify names rather than to indicate any specific order. Any figure marks in the claims should not be understood as limiting the scope of protection. The functions of multiple parts appearing in the claims can be implemented by a separate hardware or software module. The fact that certain technical features appear in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.
Claims
1. A method for selecting mold input features, comprising: Obtaining a candidate feature, including feature data of the candidate feature and an original binning point of an original binning of values of the candidate feature; Based on the original binning point, construct a critical binning, where the critical binning is obtained by expanding the original binning point to two corresponding adjacent original bins; According to the value of the candidate feature in the feature data and the critical bin, a first mold entry performance index is obtained, wherein the first mold entry performance index includes the mold entry performance index of the candidate feature in the critical bin; A mold-in-molding feature is selected from the candidate features based on the first mold-in-molding performance index of the candidate feature and a second mold-in-molding performance index of the candidate feature obtained in advance, wherein the second mold-in-molding performance index includes the mold-in-molding performance index of the candidate feature in the original bin.
2. The method according to claim 1, wherein: The step of constructing critical bins based on the original bin points includes: According to a preset first ratio, starting from the original bin point, the first range is expanded in a corresponding adjacent original bin, where the first ratio is a ratio of the first range to a range of the corresponding adjacent original bin; According to a preset second ratio, starting from the original bin point, the second range is expanded in another corresponding adjacent original bin, where the second ratio is the ratio of the second range to the range of another corresponding adjacent original bin; The first range and the second range are combined to obtain the critical bin.
3. The method according to claim 2, wherein: The first ratio is less than or equal to 10%, and the second ratio is less than or equal to 10%.
4. The method according to claim 1, wherein: The step of obtaining a first mold entry performance index according to the values of the candidate features in the feature data and the critical binning includes: According to the values of the candidate features in the feature data and the critical bins, obtaining the number of the feature data whose values of the candidate features are in the critical bins; According to the number of the feature data in the critical bin, The first mold-entry performance index is obtained.
5. The method according to claim 4, wherein: The feature data has a classification label, and the classification label is used to indicate the classification result of the feature data. The step of obtaining the first mold entry performance index based on the number of feature data in the critical bin according to the values of the candidate features includes: Obtaining a first quantity of the feature data under the same classification label in the feature data in the critical bin; Obtaining a second quantity of the feature data under the same classification label in the feature data; The first mold-entry performance index is obtained according to the first quantity and the second quantity.
6. The method according to claim 4, wherein: The classification label includes a first classification label and a second classification label, and the first classification label and the second classification label respectively indicate different classification results. The step of obtaining the first mold-entry performance index according to the first quantity and the second quantity includes: Obtain a first ratio of the first quantity corresponding to the first classification label to the second quantity corresponding to the first classification label; Obtain a second ratio of the first quantity corresponding to the second classification label to the second quantity corresponding to the second classification label; The first mold-entry performance index is obtained according to the first ratio and the second ratio.
7. The method according to claim 4, wherein: The classification labels include a first classification label to an Nth classification label, N is an integer greater than 2, and the first classification label to the Nth classification label each indicate a different classification result, The step of obtaining the first mold-entry performance index according to the first quantity and the second quantity includes: According to the ratio of the first quantity to the second quantity corresponding to every two of the classification labels from the first classification label to the Nth classification label, the mold entry performance factor item corresponding to every two of the classification labels is calculated; The sum of the mold entry performance factor items corresponding to every two of the classification labels from the first classification label to the Nth classification label is determined as the first mold entry performance index.
8. The method according to claim 1, wherein: The step of selecting a mold entry feature from the candidate features based on the first mold entry performance index of the candidate feature and the second mold entry performance index of the candidate feature obtained in advance comprises: Obtaining a first weight of the first mold-entry performance indicator and a second weight of the second mold-entry performance indicator; Obtaining a comprehensive mold-entry performance index of the candidate feature by using a weighted algorithm according to the first mold-entry performance index, the first weight, the second mold-entry performance index and the second weight; Based on the comprehensive mold-in-molding performance index, a mold-in-molding feature is selected from the candidate features.
9. The method according to claim 8, wherein: The step of selecting a mold entry feature from the candidate features based on the comprehensive mold entry performance index includes: The candidate features are determined as the mold-entry features in descending order of the performance represented by the comprehensive mold-entry performance index until a preset termination condition is met.
10. The method according to claim 9, further comprising: Before the preset termination condition is met, if the comprehensive mold-entry performance index of the candidate feature meets the preset selection condition and the difference between the comprehensive mold-entry performance index of the previous mold-entry feature and the previous mold-entry feature is less than a preset difference threshold, then obtain the correlation parameter between the candidate feature and the previous mold-entry feature; If the correlation parameter exceeds a preset correlation range, the candidate feature is determined as a non-molding feature.
11. The method according to any one of claims 1 to 10, wherein: The mold performance indicators include one or more of the following: Information value, population stability index, KS statistic, area under the curve.
12. A mold feature selection device, comprising: An acquisition module, used to acquire candidate features, including feature data of the candidate features and original binning points of original bins of values of the candidate features; A binning construction module, used to construct a critical bin based on the original binning point, where the critical bin is obtained by expanding the original binning point to two corresponding adjacent original bins; An index calculation module is used to obtain a first mold entry performance index according to the value of the candidate feature in the feature data and the critical binning, wherein the first mold entry performance index includes the candidate feature value. Characterized by the mold entry performance index in the critical bin; A selection module is used to select a mold entry feature from the candidate features based on the first mold entry performance index of the candidate feature and a second mold entry performance index of the candidate feature obtained in advance, wherein the second mold entry performance index includes the mold entry performance index of the candidate feature in the original bin.
13. An electronic device comprising: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the input mold feature selection method as described in any one of claims 1 to 11 is implemented.
14. A computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the input mold feature selection method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
User classification method and device, electronic equipment and storage medium
CN113177585A
Data processing method and device, electronic equipment and storage medium
CN114153815A
Feature information processing method and device, electronic equipment and storage medium
CN114491416A
Model-in feature selection method and device, equipment and storage medium
CN116451053A
Ranked factor selection for machine learning model
US20220222483A1
Cited By
Unmanned aerial vehicle multispectral inversion method and system for corn leaf area index
CN122796837A
