Feature importance evaluation method and device, electronic equipment, and storage medium
By using feature binning and sample proportion analysis, combined with preset benchmark data, the problem of inaccurate feature importance assessment in the past has been solved, and a more accurate feature importance assessment has been achieved.
Patent Information
- Application Number
- CN202310830859.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-07-07
AI Technical Summary
Existing methods for measuring feature importance, such as information gain and Gini coefficient, are not intuitive. When there are many feature categories, the information value can easily mislead the assessment of feature importance, leading to inaccurate evaluation.
By acquiring the object attribute features and labels of the sample objects, feature binning is performed, the sample proportion of each feature bin and the difference between positive and negative samples are calculated, and the feature importance is evaluated in combination with preset benchmark data.
This improves the accuracy of feature importance assessment, ensuring the rationality of feature selection and the effectiveness of model training.
Smart Images

Figure CN116701960B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence and financial technology, and particularly relates to a feature importance evaluation method and device, an electronic device and a storage medium. BACKGROUND
[0002] Generally, feature analysis needs to be performed before data modeling; and since the quality of features directly affects the training effect of a model, the importance of features is used to determine whether the features can be used for modeling; for example, in the financial technology scenario, a user's gender feature, age feature or income feature can be used for modeling to predict whether the user will purchase insurance. Current methods for measuring feature importance mainly include information divergence (ID), Gini coefficient and information value (IV), wherein the information divergence and the Gini coefficient are not very intuitive in understanding; the information value is easier to understand than the information divergence and the Gini coefficient; however, when the information value is used to measure the importance of features, the classification of the features is more, and the information value of the features will be larger, thereby incorrectly representing the importance of the features, so that the importance of the features is not accurate enough. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a feature importance evaluation method and device, an electronic device and a storage medium, which aims to improve the accuracy of evaluating the importance of features.
[0004] To achieve the above purpose, a first aspect of the embodiments of the present application provides a feature importance evaluation method, which comprises:
[0005] obtaining an object attribute feature of a sample object and a calibration label of the sample object; wherein the calibration label is used to represent that the sample object performs a preset behavior or does not perform the preset behavior;
[0006] obtaining a feature representation of the object attribute feature to obtain a feature category of the object attribute feature;
[0007] performing feature binning processing on the object attribute feature according to the feature category to obtain feature binning data; wherein the feature binning data comprises a feature bin and a preliminary feature located in the feature bin;
[0008] obtaining an association relationship between the preliminary feature and the calibration label to obtain feature association data;
[0009] calculating a sample proportion of the feature bin according to the feature association data to obtain a positive sample proportion, a negative sample proportion and a positive-negative sample proportion;
[0010] calculate positive-negative sample difference degree data according to the positive sample proportion and the negative sample proportion;
[0011] perform feature importance evaluation according to the positive-negative sample difference degree data, the positive sample proportion, the negative sample proportion, and preset reference data.
[0012] In some embodiments, the feature classifying processing of the object attribute feature according to the feature categories includes:
[0013] perform feature classifying processing of the object attribute feature according to the feature categories, to obtain feature classifying data;
[0014] perform feature classifying processing of the object attribute feature according to the feature categories, to obtain feature classifying data;
[0015] In some embodiments, the obtaining of the association relationship between the preliminary feature and the label includes:
[0016] obtain the matching frequency of the preliminary feature and the label in the sample object, to obtain matching distribution data;
[0017] obtain the non-matching frequency of the preliminary feature and the label in the sample object, to obtain non-matching distribution data;
[0018] obtain the matching frequency of the preliminary feature and the label in the sample object, to obtain matching distribution data;
[0019] In some embodiments, the obtaining of the sample proportion of the feature box according to the feature association data includes:
[0020] obtain the number of the sample objects, to obtain a sample total amount;
[0021] obtain the matching frequency of the preliminary feature and the label in the sample object, to obtain matching distribution data;
[0022] obtain the non-matching frequency of the preliminary feature and the label in the sample object, to obtain non-matching distribution data;
[0023] obtain the non-matching frequency of the preliminary feature and the label in the sample object, to obtain non-matching distribution data;
[0024] In some embodiments, the calculation of positive-negative sample difference degree data according to the positive sample proportion and the negative sample proportion includes:
[0025] Obtaining a total matching data by obtaining a matching frequency of all the object attribute features in the sample object and the calibration label;
[0026] Obtaining a total matching proportion by calculating a proportion of the total matching data in the total sample amount;
[0027] Comparing a size relationship between the positive sample proportion and the negative sample proportion;
[0028] Taking the positive sample proportion or the negative sample proportion as a candidate proportion according to the size relationship between the positive sample proportion and the negative sample proportion;
[0029] Calculating the positive-negative sample difference degree data according to the total matching data and the candidate proportion.
[0030] In some embodiments, the feature importance evaluation according to the positive-negative sample difference degree data, the positive-negative sample proportion, and the preset reference data comprises:
[0031] Obtaining a feature binning amount by obtaining a number of the feature bins;
[0032] Calculating the preset reference data according to the feature binning amount;
[0033] Obtaining positive-negative sample logarithm data by taking logarithm calculation according to the positive-negative sample proportion;
[0034] Calculating a feature importance of each of the feature bins according to the positive-negative sample difference degree data, the positive-negative sample logarithm data, and the preset reference data to obtain preliminary feature weight data;
[0035] Performing feature importance evaluation on the object attribute features according to the preliminary feature weight data to obtain a feature evaluation result; wherein the feature evaluation result is used to represent an importance degree of the object attribute features.
[0036] In some embodiments, after the feature importance evaluation according to the positive-negative sample difference degree data, the positive-negative sample proportion, and the preset reference data, the method further comprises:
[0037] Filtering a target feature from the object attribute features according to the feature evaluation result;
[0038] Performing behavior prediction on the target object according to the target feature to obtain behavior prediction data.
[0039] To achieve the above object, a second aspect of an embodiment of the present application proposes a feature importance evaluation device, which comprises:
[0040] The sample feature acquisition module is configured to acquire an object attribute feature of a sample object and a calibration label of the sample object, wherein the calibration label is used to represent whether the sample object performs a preset behavior or does not perform the preset behavior.
[0041] The feature category acquisition module is configured to acquire a feature representation of the object attribute feature, and obtain a feature category of the object attribute feature.
[0042] The feature binning processing module is configured to perform feature binning processing on the object attribute feature according to the feature category, and obtain feature binning data, wherein the feature binning data includes a feature bin and a preliminary feature located in the feature bin.
[0043] The feature correlation data acquisition module is configured to acquire a correlation between the preliminary feature and the calibration label, and obtain feature correlation data.
[0044] The sample proportion calculation module is configured to calculate sample proportions of the feature bins according to the feature correlation data, and obtain a positive sample proportion, a negative sample proportion, and a positive-negative sample proportion.
[0045] The positive-negative sample difference degree calculation module is configured to calculate positive-negative sample difference degree data according to the positive sample proportion and the negative sample proportion.
[0046] The feature importance evaluation module is configured to perform feature importance evaluation according to the positive-negative sample difference degree data, the positive-negative sample proportion, and preset reference data.
[0047] To achieve the above object, a third aspect of embodiments of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the method of the first aspect when executing the computer program.
[0048] To achieve the above object, a fourth aspect of embodiments of the present application provides a storage medium, which is a computer readable storage medium, the storage medium stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect.
[0049] The feature importance assessment method, apparatus, electronic device, and storage medium proposed in this application improve the accuracy of feature importance assessment by acquiring object attribute features and labeling tags of sample objects, obtaining feature representations of the object attribute features to obtain feature categories of the object attribute features, performing feature binning on the object attribute features according to the feature categories to obtain feature bins and preliminary features located in the feature bins, obtaining the correlation between the preliminary features and the labeling tags to obtain feature association data, calculating the sample proportion of the feature bins based on the feature association data to obtain the positive sample proportion, negative sample proportion, and positive-negative sample proportion, and calculating the positive-negative sample difference data based on the positive sample proportion and the negative sample proportion, thereby assessing feature importance based on the positive-negative sample difference data, the positive-negative sample proportion, and preset benchmark data. Attached Figure Description
[0050] Figure 1 This is a flowchart of the feature importance assessment method provided in the embodiments of this application;
[0051] Figure 2 yes Figure 1 The flowchart for step 103 in the document;
[0052] Figure 3 yes Figure 1 The flowchart for step 104 in the document;
[0053] Figure 4 yes Figure 1 The flowchart for step 105 in the document;
[0054] Figure 5 yes Figure 1 The flowchart for step 106 in the document;
[0055] Figure 6 yes Figure 1 The flowchart for step 107 in the document;
[0056] Figure 7 This is another flowchart of the feature importance evaluation method provided in the embodiments of this application;
[0057] Figure 8 This is a schematic diagram of the feature importance evaluation device provided in the embodiments of this application;
[0058] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0059] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.
[0060] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the sequence in the flowchart. The terms "first", "second", and the like in the specification and claims and the above-described drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to limit the present application.
[0062] First, the terms involved in the present application are analyzed:
[0063] Artificial intelligence (AI): is a new technical science that studies, develops and applies systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science, artificial intelligence aims to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. The field of research includes robots, language recognition, image recognition, natural language processing and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also the theory, method, technology and application system of using digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, to perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0064] Natural language processing (NLP): NLP uses computers to process, understand and use human language (such as Chinese, English, etc.). NLP is a branch of artificial intelligence and is an interdisciplinary subject of computer science and linguistics, also commonly known as computational linguistics. Natural language processing includes syntax analysis, semantic analysis, discourse understanding, etc. Natural language processing is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining, etc. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research related to language processing, and language computing related linguistic research.
[0065] Weight of Evidence (WOE): WOE is a form of encoding of original independent variables; wherein, to encode a variable by WOE, the variable needs to be grouped, such as discretized, binned, etc. For example, in a sample customer set, the sample customer set includes first sample customers who respond and second sample customers who do not respond, a ratio between the first sample customers and the second sample customers in a group is calculated to obtain a first ratio; a ratio between the first sample customers and the second sample customers in the sample customer set is calculated to obtain a second ratio; difference comparison is performed on the first ratio and the second ratio, and difference data obtained is the WOE, wherein, the greater the WOE is, the greater the difference is, and the greater the possibility of response of the sample in the group is; the smaller the WOE is, the smaller the difference is, and the smaller the possibility of response of the sample in the group is.
[0066] Generally, feature analysis needs to be performed before data modeling; and since the quality of features directly affects the training effect of a model, the importance of features is used to determine whether the features can be used for modeling; for example, in a financial technology scenario, a gender feature, an age feature, or an income feature of a user can be used for modeling to predict whether the user purchases insurance. Currently, methods for measuring the importance of features mainly include information divergence (ID), Gini coefficient, information value (IV), etc., wherein, the information divergence and the Gini coefficient are not very intuitive in understanding; the information value is more easily understood than the information divergence and the Gini coefficient; however, when the information value is used to measure the importance of features, the more the categories of the features are, the greater the information value of the features is, and thus the importance of the features is incorrectly represented, so that the importance of the features is not accurate enough.
[0067] Therefore, the embodiment of the present application provides a feature importance evaluation method and device, an electronic device, and a storage medium, which are aimed at improving the accuracy of evaluating the importance of features.
[0068] The feature importance evaluation method and device, the electronic device, and the storage medium provided by the embodiment of the present application are specifically described by the following embodiments, and first, the feature importance evaluation method in the embodiment of the present application is described.
[0069] The embodiment of the present application can acquire and process related data based on artificial intelligence technology. Wherein, artificial intelligence (AI) is to use digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, perceive environment, acquire knowledge and use knowledge to obtain the best results.
[0070] The artificial intelligence basic technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric identification technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0071] The feature importance evaluation method provided by the embodiments of the present application relates to the field of artificial intelligence. The feature importance evaluation method provided by the embodiments of the present application can be applied in a terminal, can also be applied in a server end, and can also be software running in a terminal or a server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform, etc.; and the software can be an application implementing the feature importance evaluation method, etc., but is not limited to the above forms.
[0072] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0073] It should be noted that in various specific embodiments of the present application, when relevant processing needs to be performed according to user information, user feature data, user behavior data, user historical data, and user attribute information, etc. related to the identity or characteristics of the user, the user's permission or consent will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for the normal operation of the embodiments of the present application will be obtained.
[0074] Figure 1 is an optional flowchart of the feature importance evaluation method provided by the embodiments of the present application, Figure 1 The method in can include but not limited to steps 101 to 107.
[0075] Step 101, obtaining object attribute features of sample objects and calibration labels of sample objects; wherein the calibration label is used to represent that the sample object performs a preset behavior or does not perform a preset behavior;
[0076] Step 102, obtaining a feature representation of the object attribute features to obtain a feature category of the object attribute features;
[0077] Step 103, performing feature binning processing on the object attribute features according to the feature category to obtain feature binning data; wherein the feature binning data includes a feature bin and a preliminary feature located in the feature bin;
[0078] Step 104, obtaining an association relationship between the preliminary feature and the calibration label to obtain feature association data;
[0079] Step 105, calculating a sample proportion of the feature bin according to the feature association data to obtain a positive sample proportion, a negative sample proportion, and a positive-negative sample proportion;
[0080] Step 106, calculating positive-negative sample difference degree data according to the positive sample proportion and the negative sample proportion;
[0081] Step 107, performing feature importance evaluation according to the positive-negative sample difference degree data, the positive-negative sample proportion, and preset reference data.
[0082] The steps 101 to 107 shown in the embodiments of the present application obtain the object attribute features of the sample objects, the calibration labels of the sample objects, obtain the feature categories of the object attribute features through obtaining the feature representation of the object attribute features, and perform feature binning processing on the object attribute features according to the feature categories to obtain the feature bins and the preliminary features located in the feature bins, obtain the feature association data between the preliminary features and the calibration labels, calculate the sample proportion of the feature bins according to the feature association data, obtain the positive sample proportion, the negative sample proportion, and the positive-negative sample proportion, and calculate the positive-negative sample difference degree data according to the positive sample proportion and the negative sample proportion, so that the feature importance evaluation is performed according to the positive-negative sample difference degree data, the positive-negative sample proportion, and the preset reference data, and the accuracy of evaluating the feature importance can be improved.
[0083] In step 101 of some embodiments, the sample object can be a user, for example, in an insurance application scenario, the sample object can be a policyholder, and for example, in a promotion activity, the sample object can be a buyer. The object attribute feature is a feature used to represent the attribute of the sample object, for example, it can be age, which can be in the form of age range, for example, it can be children, youth, middle-aged, and old. In another embodiment, the object attribute feature can also be gender, for example, it can be male or female, or unknown gender. The calibration label is a dependent variable, for example, when the calibration label represents a binary dependent variable, it is yes or no, so that the calibration label can be used to represent whether the sample object performs a preset behavior. The calibration label can take the value of 1 or 0, where 1 represents yes and 0 represents no, that is, 1 represents performing a preset behavior and 0 represents not performing a preset behavior. For example, in the insurance field, the preset behavior is to purchase insurance, and the calibration label is used to represent whether the policyholder purchases insurance. When the calibration label takes the value of 1, it represents that the policyholder purchases insurance, and when the calibration label takes the value of 0, it represents that the policyholder does not purchase insurance. For example, in the application scenario of a promotion activity, the preset behavior is malicious order matching, and the calibration label is used to represent whether the buyer performs malicious order matching. When the calibration label takes the value of 1, it represents that the buyer performs malicious order matching, and when the calibration label takes the value of 0, it represents that the buyer does not perform malicious order matching. For example, in the payment application scenario, the preset behavior is to pay on time, and the calibration label is used to represent whether the payer pays on time. When the calibration label takes the value of 1, it represents that the payer pays on time, and when the calibration label takes the value of 0, it represents that the payer does not pay on time.
[0084] In an embodiment, the number of sample objects is n, and each sample object has m object attribute features. Referring to Table 1, in a specific application scenario, the sample objects can be represented as sample object s1, sample object s2, …, and sample object sn, a total of n sample objects; each sample object can be represented by m object attribute features, object attribute feature x1, object attribute feature x2, …, and object attribute feature xm; it should be noted that not all sample objects must have m object attribute features, and the number of m object attribute features of the sample objects can be less than m; the calibration label of the sample object is represented by y; for example, sample object s1 represents the first customer, object attribute feature x1 represents the gender of the first customer, and y represents whether the first customer purchases insurance.
[0085] Sample object x1 x2 … xm y s1 s2 s3 … sn
[0086] Table 1
[0087] In step 102 of some embodiments, different object attribute features can be represented by different identifiers, and the identifier of the object attribute feature is a feature identifier. Different feature identifiers correspond to different feature categories. For example, in an application scenario, the object attribute feature is gender, the feature represented by x1_1 is the male category, the feature represented by x1_2 is the female category, and the feature represented by x1_3 is the unknown category. For example, in an application scenario, the object attribute feature is age, the feature represented by x2_1 is the child category, the feature represented by x2_2 is the youth category, the feature represented by x2_3 is the middle-aged category, and the feature represented by x2_4 is the old category.
[0088] Referring to Figure 2 In step 103 of some embodiments, steps 201 to 202 can be included, but are not limited to including steps 201 to 202:
[0089] In step 201, binning is performed according to the feature category to obtain a feature bin; wherein one feature category is taken as one feature bin;
[0090] In step 202, the object attribute features are loaded into the feature bin according to the feature category, and the object attribute features loaded into the feature bin are taken as preliminary features.
[0091] In step 201 of some embodiments, the feature bin can be used to represent features common to all sample objects, and the feature category corresponds to the feature bin one-to-one. In step 202 of some embodiments, the corresponding object attribute features are loaded into the corresponding feature bin according to the feature category, and the object attribute features loaded into the feature bin are taken as preliminary features.
[0092] Referring to Table 2, in an embodiment, x1_1 represents a first feature bin of a first object attribute feature, x1_1 also represents a first feature category of the first object attribute feature, x1_2 represents a second feature bin of the first object attribute feature, x1_2 also represents a second feature category of the first object attribute feature, x1_3 represents a third feature bin of the first object attribute feature, x1_3 also represents a third feature category of the first object attribute feature; x2_1 represents a first feature bin of a second object attribute feature, x2_1 also represents a first feature category of the second object attribute feature, x2_2 represents a second feature bin of the second object attribute feature, x2_2 also represents a second feature category of the second object attribute feature, x2_3 represents a third feature bin of the second object attribute feature, x2_3 also represents a third feature category of the second object attribute feature, x2_4 represents a fourth feature bin of the second object attribute feature, x2_4 also represents a fourth feature category of the second object attribute feature, and so on, xm_1 represents a first feature bin of an mth object attribute feature, xm_1 also represents a first feature category of the mth object attribute feature, xm_2 represents a second feature bin of the mth object attribute feature, xm_2 also represents a second feature category of the mth object attribute feature. Specifically, in an application scenario, the first object attribute feature represents a gender feature, wherein x1_1 represents male, x1_1 also represents a preliminary feature; x1_2 represents female, x1_2 also represents a preliminary feature; x1_3 represents unknown gender (i.e. uncertain gender), x1_3 also represents a preliminary feature; the second object attribute feature represents an age group feature, x2_1 represents children, x2_1 also represents a preliminary feature; x2_2 represents youth, x2_2 also represents a preliminary feature; x2_3 represents youth, x2_3 also represents a preliminary feature; x2_4 represents old age, x2_4 also represents a preliminary feature.
[0093] In Table 2, y1 and y0 represent a labeling label, which is a dependent variable, when the labeling label represents a binary classification variable, y1 represents yes (which can take the value 1), and y0 represents no (which can take the value 0). In a specific scenario in the insurance field, y1 represents purchasing insurance, and y0 represents not purchasing insurance. In the following, step 104 will be described in detail.
[0094]
[0095] Table 2
[0096] Referring to Figure 3 In some embodiments of step 104, steps 301 to 303 can be included, but are not limited to including steps 301 to 303:
[0097] In step 301, the matching frequency of the preliminary feature and the calibration label in the sample object is obtained to obtain matching distribution data.
[0098] In step 302, the non-matching frequency of the preliminary feature and the calibration label in the sample object is obtained to obtain non-matching distribution data.
[0099] In step 303, the feature correlation data of the preliminary feature is obtained according to the matching distribution data and the non-matching distribution data.
[0100] In an application scenario, the matching distribution data is used to represent the correlation between the preliminary feature and the calibration label, and the non-matching distribution data is also used to represent the correlation between the preliminary feature and the calibration label. Please refer to Table 2 for a specific example: x1_1 is male, x1_2 is female, and x1_3 is unknown. The coordinate point (x1_1, y1) represents the amount of male purchasing insurance, denoted as n111, which represents the correlation between male gender and purchasing insurance (the calibration label is yes). (x1_1, y0) represents the amount of male not purchasing insurance, denoted as n110, which represents the correlation between male gender and not purchasing insurance (the calibration label is no). Similarly, n121 represents the amount of female purchasing insurance (the calibration label is yes), n120 represents the amount of female not purchasing insurance (the calibration label is no); n131 represents the amount of unknown gender purchasing insurance (the calibration label is yes), n120 represents the amount of unknown gender not purchasing insurance (the calibration label is no); n211 represents the amount of children purchasing insurance (the calibration label is yes), n210 represents the amount of children not purchasing insurance (the calibration label is no); n221 represents the amount of young people purchasing insurance (the calibration label is yes), n220 represents the amount of young people not purchasing insurance (the calibration label is no); n231 represents the amount of middle-aged people purchasing insurance (the calibration label is yes), n230 represents the amount of middle-aged people not purchasing insurance (the calibration label is no); n241 represents the amount of old people purchasing insurance (the calibration label is yes), and n240 represents the amount of old people not purchasing insurance (the calibration label is no).
[0101] In the sample object, the amount of male (preliminary feature) purchasing insurance (calibration label is yes) is n111, the amount of male (preliminary feature) not purchasing insurance (calibration label is no) is n110; the amount of female (preliminary feature) purchasing insurance (calibration label is yes) is n121, the amount of female (preliminary feature) not purchasing insurance (calibration label is no) is n120; the amount of unknown gender (preliminary feature) purchasing insurance (calibration label is yes) is n131, and the amount of unknown gender (preliminary feature) not purchasing insurance (calibration label is no) is n130.
[0102] In the statistical sample objects, the amount of children (primary feature) purchasing insurance (the calibrated label is yes) is n211, the amount of children (primary feature) not purchasing insurance (the calibrated label is no) is n210; the amount of young people (primary feature) purchasing insurance (the calibrated label is yes) is n221, the amount of young people (primary feature) not purchasing insurance (the calibrated label is no) is n220; the amount of middle-aged people (primary feature) purchasing insurance (the calibrated label is yes) is n231, the amount of middle-aged people (primary feature) not purchasing insurance (the calibrated label is no) is n230; the amount of old people (primary feature) purchasing insurance (the calibrated label is yes) is n241, the amount of old people (primary feature) not purchasing insurance (the calibrated label is no) is n240.
[0103] The amount of male purchasing insurance n111, the amount of female purchasing insurance n121, and the amount of unknown gender purchasing insurance n131 shown in Table 2 are the matching distribution data of step 301; the amount of male not purchasing insurance n110, the amount of female not purchasing insurance n120, and the amount of unknown gender not purchasing insurance n130 in Table 2 are the non-matching distribution data of step 302. The matching distribution data of step 301 and the non-matching distribution data of step 302 are added to obtain the feature correlation data of whether the gender feature purchases insurance.
[0104] Please refer to Figure 4 In step 105 of some embodiments, it can include but is not limited to steps 401 to 404:
[0105] Step 401, obtaining the total amount of samples according to the primary feature and the feature correlation data;
[0106] Step 402, calculating the proportion of matching distribution data in the feature correlation data to obtain the positive sample proportion;
[0107] Step 403, calculating the proportion of non-matching distribution data in the feature correlation data to obtain the negative sample proportion;
[0108] Step 404, calculating the proportion of feature correlation data in the total amount of samples to obtain the proportion of positive and negative samples.
[0109] In some embodiments, the total amount of samples obtained is represented by sum, and the total amount of samples sum also represents the total sample amount; the proportion of positive samples is calculated by step 402, for example, in the gender characteristics of the above embodiments, the proportion of men who buy insurance is the proportion of positive samples, represented by r111, the amount of men who buy insurance n111 is the matching distribution data, and the amount of men who do not buy insurance n110 is the non-matching distribution data, the matching distribution data n111+ the non-matching distribution data n110 = the characteristic correlation data, the proportion of positive samples r111 of men who buy insurance = n111 / (n111+n110), and similarly, the proportion of positive samples r110 of men who do not buy insurance = n110 / (n111+n110). By analogy, the proportion of positive samples r121 of women who buy insurance and the proportion of negative samples r120 of women who do not buy insurance can also be calculated, the proportion of positive samples r131 of unknown gender who buy insurance and the proportion of negative samples r130 of unknown gender who do not buy insurance can also be calculated, the proportion of positive samples r211 of children who buy insurance and the proportion of negative samples r210 of children who do not buy insurance can also be calculated, the proportion of positive samples r221 of young people who buy insurance and the proportion of negative samples r220 of young people who do not buy insurance can also be calculated, the proportion of positive samples r231 of middle-aged people who buy insurance and the proportion of negative samples r230 of middle-aged people who do not buy insurance can also be calculated, and the proportion of positive samples r241 of old people who buy insurance and the proportion of negative samples r240 of old people who do not buy insurance can also be calculated, and so on, which will not be described here.
[0110] The proportion of characteristic correlation data in the total amount of samples can be calculated by step 404 to obtain the proportion of positive and negative samples, for example: the proportion of the sum of men who buy insurance and do not buy insurance in the total sample amount is calculated; in this scenario, the total sample amount sum = the amount of men who buy insurance n111 + the amount of men who do not buy insurance n110 + the amount of women who buy insurance n121 + the amount of women who do not buy insurance n120 + the amount of unknown gender who buy insurance n131 + the amount of unknown gender who do not buy insurance n130. Thus, the proportion of positive and negative samples w11 of men who buy insurance and do not buy insurance is calculated as (n111+n110) / sum = (n111+n110) / (n111+n110+n121+n120+n131+n130).
[0111] The method for calculating the proportion of positive samples r111 and the proportion of negative samples r110 in the embodiments of the present application is completely different from the traditional WOE principle, which is: the proportion of each bin under positive and negative samples is calculated respectively, and then the proportion of positive samples in each bin is compared with the proportion of negative samples in the corresponding bin. The embodiments of the present application are a horizontal method, which mainly compares the proportion of positive samples and the proportion of negative samples under each characteristic bin. In addition, a coefficient sn1 is added in step 107 in the embodiments of the present application, which is used to adjust the trend of increasing characteristics caused by too many bins.
[0112] Referring to Figure 5 In step 106 of some embodiments, can include but not limited to including steps 501 to 505:
[0113] Step 501, obtaining the matching frequency of all object attribute features in the sample object and the calibration label, obtaining total matching data;
[0114] Step 502, calculating the proportion of total matching data in the total sample, obtaining total matching proportion;
[0115] Step 503, comparing the size relationship between the positive sample proportion and the negative sample proportion;
[0116] Step 504, according to the size relationship between the positive sample proportion and the negative sample proportion, taking the positive sample proportion or the negative sample proportion as the candidate proportion;
[0117] Step 505, according to the total matching data and the candidate proportion, calculating the positive and negative sample difference data.
[0118] In some embodiments, the frequency of the calibration label y being 1 (purchasing insurance) in the total sample is obtained as the total matching data through step 501; the total matching proportion obtained through step 502 is actually the probability of the calibration label y being 1 (purchasing insurance) in the total sample, and the total matching proportion is represented by c; through steps 503 to 504, the size relationship between the positive sample proportion and the negative sample proportion is compared, and the value greater is selected from the positive sample proportion and the negative sample proportion as the candidate proportion, that is, if the positive sample proportion is greater than the negative sample proportion, the positive sample proportion is taken as the candidate proportion, and if the negative sample proportion is greater than the positive sample proportion, the negative sample proportion is taken as the candidate proportion. Specifically, taking whether the male purchases insurance as an example for illustration, the candidate proportion r11 represents the candidate proportion of whether the male purchases insurance or not: candidate proportion r11 = max(r111, r110).
[0119] In some embodiments, continuing to take whether the male purchases insurance as an example for illustration, the principle of step 505 for calculating the positive and negative sample difference data is:
[0120] Calculate the quotient between the candidate proportion and the total matching proportion, and obtain the proportion quotient value;
[0121] Taking the logarithm of the proportion quotient value and performing absolute value calculation, obtaining the positive and negative sample difference data.
[0122] In the embodiments of the application, the positive and negative sample difference degree data can be represented as abs_ln_yr. Specifically, the example of whether a male purchases insurance is taken to illustrate. The quotient between the candidate ratio of whether a male purchases insurance and the total matching ratio is calculated to obtain a ratio quotient value, which can be represented as: r11 / c. The positive and negative sample difference degree data can be represented as: a11=abs(ln(r11 / c)), which is obtained by taking the absolute value of the logarithm of the ratio quotient value. Wherein, ln(r11 / c) represents: taking the logarithm of r11 / c with the natural base e, and the natural base e is approximately 2.71. Wherein, abs() represents absolute value calculation of data.
[0123] In the embodiments of the application, the greater the calculated positive and negative sample difference degree data a11 is, the greater the value is, indicating that the discrimination is greater.
[0124] In the embodiments of the application, the greater the calculated positive and negative sample difference degree data a11 is, the greater the value is, indicating that the discrimination is greater.
[0125] Please refer to Figure 6 In step 107 of some embodiments, it can include but is not limited to steps 601 to 605:
[0126] Step 601: Obtain the number of feature bins to obtain the feature binning amount;
[0127] Step 602: Calculate the preset reference data according to the feature binning amount;
[0128] Step 603: Perform logarithm calculation according to the positive and negative sample ratio to obtain positive and negative sample logarithm data;
[0129] Step 604: Calculate the feature importance of each feature bin according to the positive and negative sample difference degree data, the positive and negative sample logarithm data, and the preset reference data to obtain preliminary feature weight data;
[0130] Step 605: Perform feature importance evaluation on the object attribute feature according to the preliminary feature weight data to obtain a feature evaluation result; wherein, the feature evaluation result is used to represent the importance of the object attribute feature.
[0131] In some embodiments, the feature binning quantity obtained by step 601 is represented as bn, and the preset reference data calculated by step 602 is represented as sn: preset reference data sn = In(bn). Taking whether the different genders purchase insurance as an example, and combining Table 2, the feature binning quantity obtained by step 601 is represented as b1, and b1 = 3 (3 feature bins: x1_1, x1_2, x1_3), and the preset reference data calculated by step 602 is sn11 = In(b1) = In(3); similarly, the feature binning quantity of the age feature shown in Table 2 is b2 = 4 (4 feature bins: x2_1, x2_2, x2_3, x2_4), and the preset reference data calculated by step 602 is sn2 = In(b2) = In(4).
[0132] The positive and negative sample pair data obtained according to step 603 can be represented as: ln(1+wy).
[0133] From the above embodiments, the positive and negative sample proportion of whether the male purchases insurance can be represented as w11, and the positive and negative sample pair data obtained by taking the logarithm of the positive and negative sample proportion w11 according to step 603 can be represented as: positive and negative sample pair data = ln(1+w11).
[0134] The preliminary feature weight data calculated by step 604 can be represented as cwy, cwy = abs_ln_yr*ln(1+wy) / sn, wherein ln(1+wy) / sn can be used to represent the weight of the positive and negative sample pair data, and can make the weight of the positive and negative sample pair data greater than 0 and less than 1.
[0135] Specifically, the preliminary feature weight data of the feature bin x1_1 (male) can be represented as cw11, specifically: cw11 = a11*ln(1+w11) / sn1; similarly, the preliminary feature weight data of the feature bin x1_2 (female) can be calculated as cw12, and the preliminary feature weight data of the feature bin x1_3 (unknown gender) can be calculated as cw13, so that the sum of cw11, cw12 and cw13 can be calculated to obtain the final weight of the three feature bins of the gender feature, which is represented as: cw11+cw12+cw13.
[0136]
[0137] Table 3
[0138] The preliminary feature weight data obtained according to step 605 = positive-negative sample difference degree data * positive-negative sample logarithm data = abs_ln_yr * ln(1+wy) / sn, wherein ln(1+wy) / sn can be used to represent the weight of the positive-negative sample logarithm data, and can make the weight of the positive-negative sample logarithm data greater than 0 and less than 1. By calculating abs_ln_yr * ln(1+wy) / sn, the weight (discrimination weight) abs_ln_yr of the positive-negative sample difference degree data can be greater than the weight ln(1+wy) / sn of the positive-negative sample logarithm data. Compared with directly using the positive-negative sample proportion wy as the weight, the embodiment of the present application can make the feature importance biased to the features with high proportion in certain feature segments; in addition, it can also avoid too many feature segments (too many feature bins), which leads to the final importance being too high. The following embodiments will be described in detail:
[0139] For the object attribute feature xm, there are p feature segments, and the sum of the p feature segments is 1; the embodiment of the present application takes p=2 as an example for description, the object attribute feature xm has two feature segments wm1 and wm2, and wm1+wm2=1,
[0140] In(1+wm1)+ln(1+wm2)
[0141] =In(exp(ln(1+wm1)+ln(1+wm2))
[0142] =ln(exp(ln(1+wm1))*exp(ln(1+wm2)))
[0143] =ln((1+wm1)*(1+wm2))=ln((1+wm1)*(1+1-xm1)),
[0144] Generally, when xm1=wm2, the calculated w value is the largest; wherein w is abs_ln_yr*ln(1+wy), and w / p=abs_ln_yr*ln(1+wy) / sn. Specifically, referring to the experimental data shown in Table 4, if for the object attribute feature xm, p=3, there are three segments wm1, wm2 and wm3, and wm1+wm2+wm3=1; for the object attribute feature xm, p=3, there are four segments wm1, wm2, wm3 and wm4, and wm1+wm2+wm3+wm4=1.
[0145]
[0146] Table 4
[0147] The method for calculating the positive sample proportion r111 and the negative sample proportion r110 in the embodiments of the present application is completely different from the traditional WOE principle. The traditional WOE principle is to calculate the proportion of each bin under the positive and negative samples respectively, and then compare the proportion of the positive sample in each bin with the proportion of the negative sample in the corresponding bin. The embodiments of the present application are a horizontal method, mainly comparing the proportion of the positive sample and the proportion of the negative sample under each feature bin. In addition, in step 107, the coefficient (preset reference data) is added in the embodiments of the present application, which can be used to adjust the trend of excessive bin number and feature increase.
[0148] In an extreme example, for example, all men buy insurance and all women do not buy insurance, then the gender can directly predict whether the user buys insurance. However, in actual scenarios, there is generally no such ideal extreme example. The actual scenario is that under a specific segment, the proportion of whether to buy is between 0 and 1, and the greater the discrimination, the more obvious the feature. In addition, the sample size of this segment also needs to be considered. If the number of samples is too small, for example, only a few samples, its influence on the whole is negligible.
[0149] Compared with the traditional WOE method, there is no case in the embodiments of the present application that the IV value increases with the increase of the number of feature bins. Using the traditional WOE method, for example, the IV value of dividing the age into 4 bins will be smaller than the IV value of dividing the age into 10 bins. Therefore, a problem arises that the binning situation may not be the same for each feature. For example, gender can be divided into 3 bins (male, female, unknown gender), age can be divided into 4 bins (children, young, middle-aged, old), and age can be divided into 10 bins (under 1 year old, 1-6 years old, 6-10 years old, 10-16 years old, 16-18 years old, 18-22 years old, 22-28 years old, 28-35 years old, 35-45 years old, 45- years old, 45 years old and above). When the IV value calculated by the traditional WOE method is used to evaluate the importance of the feature, it will tend to the feature with more bins.
[0150] Please refer to Figure 7 In some embodiments, after step 107, the feature importance evaluation method further includes but is not limited to steps 701 to 702:
[0151] Step 701, screening a target feature from the object attribute features according to the feature evaluation result;
[0152] Step 702, performing behavior prediction on the target object according to the target feature to obtain behavior prediction data.
[0153] At step 701 of some embodiments, according to the feature evaluation result, object attribute features with higher importance are screened out from the object attribute features as target features; the target features screened out can be used for behavior prediction of the target object at step 702, and the behavior prediction data obtained by prediction is used to represent whether the target object will perform a certain behavior. The target object can be a user, for example, in an insurance application scenario, the target object can be an insurance applicant, and for example, in a promotion activity, the target object can be a buyer. In the insurance application scenario, the behavior prediction data can be used to represent whether the insurance applicant purchases insurance; in the promotion activity, the behavior prediction data can be used to represent whether the buyer will maliciously join a group purchase; for example, the behavior prediction data can be used to represent whether a fee-paying user will pay fees on time.
[0154] Please refer to Figure 8 The embodiments of the present application also provide a feature importance evaluation device, which can implement the feature importance evaluation method described above. The device comprises:
[0155] A sample feature acquisition module is configured to acquire object attribute features of a sample object and a calibration label of the sample object. The calibration label is used to represent whether the sample object performs a preset behavior or does not perform the preset behavior.
[0156] A feature category acquisition module is configured to acquire a feature representation of the object attribute features, and obtain a feature category of the object attribute features.
[0157] A feature binning processing module is configured to perform feature binning processing on the object attribute features according to the feature category, and obtain feature binning data. The feature binning data comprises a feature bin and a preliminary feature located in the feature bin.
[0158] A feature correlation data acquisition module is configured to acquire a correlation between the preliminary feature and the calibration label, and obtain feature correlation data.
[0159] A sample proportion calculation module is configured to calculate a sample proportion of the feature bin according to the feature correlation data, and obtain a positive sample proportion, a negative sample proportion, and a positive-negative sample proportion.
[0160] A positive-negative sample difference degree calculation module is configured to calculate positive-negative sample difference degree data according to the positive sample proportion and the negative sample proportion.
[0161] A feature importance evaluation module is configured to perform feature importance evaluation according to the positive-negative sample difference degree data, the positive-negative sample proportion, and preset reference data.
[0162] In some embodiments, the feature binning processing module can be specifically configured to implement:
[0163] Binning is performed according to the feature category, and a feature bin is obtained. One feature category is taken as one feature bin.
[0164] According to the feature category, the object attribute features are packed into the feature box, and the object attribute features packed into the feature box are taken as the preliminary features.
[0165] Specifically, the feature binning processing module can be used to implement the above steps 201 to 202, which will not be repeated here.
[0166] In some embodiments, the feature correlation data obtaining module, in particular, can be used to implement:
[0167] Obtain the matching frequency of the preliminary features and the calibration label in the sample object, and obtain the matching distribution data;
[0168] Obtain the non-matching frequency of the preliminary features and the calibration label in the sample object, and obtain the non-matching distribution data;
[0169] According to the matching distribution data and the non-matching distribution data, the feature correlation data of the preliminary features is obtained.
[0170] In some embodiments, in particular, the feature correlation data obtaining module can be used to implement the above steps 301 to 303, which will not be repeated here.
[0171] In some embodiments, the sample proportion calculation module, in particular, can be used to implement:
[0172] Obtain the number of sample objects to obtain the total amount of samples;
[0173] Calculate the proportion of the matching distribution data in the feature correlation data to obtain the positive sample proportion;
[0174] Calculate the proportion of the non-matching distribution data in the feature correlation data to obtain the negative sample proportion;
[0175] Calculate the proportion of the feature correlation data in the total amount of samples to obtain the positive and negative sample proportion.
[0176] In some embodiments, in particular, the sample proportion calculation module can be used to implement the above steps 401 to 404, which will not be repeated here.
[0177] In some embodiments, the positive and negative sample difference degree calculation module, in particular, can be used to implement:
[0178] Obtain the matching frequency of all object attribute features and the calibration label in the sample object to obtain the total matching data;
[0179] Calculate the proportion of the total matching data in the total amount of samples to obtain the total matching proportion;
[0180] Compare the size relationship between the positive sample proportion and the negative sample proportion;
[0181] According to the size relationship between the positive sample proportion and the negative sample proportion, the positive sample proportion or the negative sample proportion is taken as a candidate proportion;
[0182] According to the total matching data and the candidate proportion, positive-negative sample difference degree data is calculated.
[0183] In some embodiments, specifically, the positive-negative sample difference degree calculation module can be used to implement steps 501-505 described above, which will not be repeated here.
[0184] In some embodiments, the feature importance evaluation module can be specifically used to implement:
[0185] The number of feature bins is obtained, and the feature binning amount is obtained.
[0186] According to the feature binning amount, a preset reference data is calculated.
[0187] According to the positive-negative sample proportion, logarithmic calculation is performed to obtain positive-negative sample logarithmic data.
[0188] According to the positive-negative sample difference degree data, the positive-negative sample logarithmic data, and the preset reference data, the feature importance of each feature bin is calculated to obtain preliminary feature weight data.
[0189] According to the preliminary feature weight data, the feature importance of the object attribute feature is evaluated to obtain a feature evaluation result; wherein the feature evaluation result is used to represent the importance of the object attribute feature.
[0190] In some embodiments, specifically, the feature importance evaluation module can be used to implement steps 601-605 described above, which will not be repeated here.
[0191] In addition, the feature importance evaluation device described above further includes a behavior prediction module, which can be specifically used to implement:
[0192] According to the feature evaluation result, a target feature is screened from the object attribute feature;
[0193] According to the target feature, behavior prediction of a target object is performed to obtain behavior prediction data.
[0194] In some embodiments, specifically, the behavior prediction module can be used to implement steps 701-702 described above, which will not be repeated here.
[0195] The specific implementation of the feature importance evaluation device is basically the same as the specific embodiments of the feature importance evaluation method described above, which will not be repeated here.
[0196] The embodiment of the present application further provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the feature importance evaluation method when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0197] Please refer to Figure 9 , Figure 9 The hardware structure of the electronic device of another embodiment is illustrated, which comprises:
[0198] The processor 801 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0199] The memory 802 can be implemented in the form of a ROM (ReadOnly Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 802 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 802 and are called and executed by the processor 801 to implement the feature importance evaluation method of the embodiments of the present application.
[0200] The input / output interface 803 is used to realize information input and output.
[0201] The communication interface 804 is used to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0202] The bus 805 is used to transmit information between various components (for example, the processor 801, the memory 802, the input / output interface 803, and the communication interface 804) of the device.
[0203] The processor 801, the memory 802, the input / output interface 803, and the communication interface 804 are connected to each other through the bus 805 to realize the communication connection between them in the device.
[0204] The embodiment of the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program. The computer program is executed by a processor to implement the feature importance evaluation method.
[0205] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory that is remotely arranged with respect to the processor, and these remote memories can be connected to the processor through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0206] The feature importance evaluation method and device, electronic equipment and storage medium provided by the embodiments of the present application can obtain the object attribute feature of the sample object and the calibration label of the sample object, obtain the feature representation of the object attribute feature to obtain the feature category of the object attribute feature, and perform feature binning processing on the object attribute feature according to the feature category to obtain a feature bin and a preliminary feature located in the feature bin, obtain the association relationship between the preliminary feature and the calibration label to obtain feature association data, calculate the sample proportion of the feature bin according to the feature association data, obtain the positive sample proportion, the negative sample proportion and the positive-negative sample proportion, and calculate the positive-negative sample difference degree data according to the positive sample proportion and the negative sample proportion, so that the feature importance can be evaluated according to the positive-negative sample difference degree data, the positive-negative sample proportion and the preset reference data, and the accuracy of evaluating the feature importance can be improved.
[0207] Compared with the traditional WOE method, there is no case in the embodiments of the present application that the IV value increases with the increase of the number of feature bins. Using the traditional WOE method, the IV value of dividing the age into 4 bins will be smaller than the IV value of dividing the age into 10 bins; therefore, a problem will be caused: for each feature, the binning situation can be different, for example, the gender can be divided into 3 bins, and the age can be divided into 10 bins, and when the IV value calculated by using the traditional WOE method is used to evaluate the feature importance, the feature with more binning numbers (for example, the age described above) will be preferred.
[0208] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0209] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than those shown in the figures, or combine certain steps or different steps.
[0210] The apparatus embodiments described above are merely exemplary, and the units described as separate units can or can not be physically separate, i.e., can be located in one place, or can be distributed over multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0211] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.
[0212] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims of the foregoing drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so
[0213] It should be understood that in this application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c, can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0214] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.
[0215] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0216] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0217] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0218] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method for evaluating feature importance, characterized in that, The method includes: Obtain the object attribute features of the sample object and the label of the sample object; wherein, the label is used to characterize whether the sample object performs a preset behavior or does not perform the preset behavior; Obtain the feature representation of the object attribute features to obtain the feature category of the object attribute features; The object attribute features are binned according to the feature category to obtain binned feature data; wherein, the binned feature data includes feature bins and preliminary features located in the feature bins; The association between the preliminary features and the calibration labels is obtained to obtain feature association data; The sample proportion of the feature bin is calculated based on the feature association data to obtain the positive sample proportion, negative sample proportion, and positive-negative sample proportion; Calculate the positive-negative sample difference data based on the positive sample proportion and the negative sample proportion; The importance of features is evaluated based on the positive and negative sample difference data, the positive and negative sample ratios, and the preset benchmark data. The step of calculating the sample proportion of the feature bin based on the feature association data to obtain the positive sample proportion, negative sample proportion, and positive-negative sample proportion includes: The total number of samples is obtained based on the preliminary features and the feature-related data. Calculate the proportion of matching distribution data in the feature association data to obtain the proportion of positive samples; The proportion of non-matching distribution data in the feature association data is calculated to obtain the proportion of negative samples; wherein, the feature association data is obtained from the matching distribution data and the non-matching distribution data; The proportion of positive and negative samples is obtained by calculating the ratio of the feature-related data to the total number of samples.
2. The method according to claim 1, characterized in that, The step of performing feature binning on the object attribute features according to the feature category to obtain feature binned data includes: The feature bins are obtained by binning according to the feature categories; wherein, each feature category is considered as one feature bin. The object attribute features are loaded into the feature box according to the feature category, and the object attribute features loaded into the feature box are used as the preliminary features.
3. The method according to claim 1, characterized in that, The step of obtaining the association between the preliminary features and the calibration labels to obtain feature association data includes: The matching frequency between the preliminary features and the calibration labels in the sample object is obtained to obtain the matching distribution data; The frequency of non-matching between the preliminary features and the labeled values in the sample object is obtained to obtain the non-matching distribution data. The feature association data of the preliminary feature is obtained by adding the matching distribution data and the non-matching distribution data.
4. The method according to claim 3, characterized in that, The calculation of the positive-negative sample difference data based on the positive sample proportion and the negative sample proportion includes: Obtain the matching frequency of all object attribute features and the label in the sample object to obtain the total matching data; Calculate the proportion of the total matched data in the total sample to obtain the total matched proportion; Compare the relationship between the proportion of positive samples and the proportion of negative samples; Based on the relationship between the positive sample percentage and the negative sample percentage, either the positive sample percentage or the negative sample percentage is selected as a candidate percentage. The positive and negative sample difference data are calculated based on the total matching data and the candidate proportion.
5. The method according to any one of claims 1 to 4, characterized in that, The feature importance assessment based on the positive and negative sample difference data, the positive and negative sample proportions, and preset benchmark data includes: The number of feature bins is obtained to determine the feature bin quantity; The preset baseline data is calculated based on the characteristic binning quantity; Logarithmic calculations are performed based on the proportion of positive and negative samples to obtain the logarithmic data of positive and negative samples; Based on the positive and negative sample difference data, the positive and negative sample logarithmic data, and the preset benchmark data, the feature importance of each feature box is calculated to obtain preliminary feature weight data; The object attribute features are evaluated for feature importance based on the preliminary feature weight data to obtain feature evaluation results; wherein, the feature evaluation results are used to represent the importance of the object attribute features.
6. The method according to claim 5, characterized in that, After evaluating the feature importance based on the positive and negative sample difference data, the positive and negative sample proportions, and the preset benchmark data, the method further includes: Based on the feature evaluation results, target features are selected from the object attribute features; Based on the target characteristics, the behavior of the target object is predicted to obtain behavior prediction data.
7. A feature importance assessment device, characterized in that, The device includes: The sample feature acquisition module is used to acquire the object attribute features of the sample object and the label of the sample object; wherein, the label is used to characterize whether the sample object performs a preset behavior or does not perform the preset behavior; The feature category acquisition module is used to acquire the feature representation of the object attribute features and obtain the feature category of the object attribute features; The feature binning processing module is used to perform feature binning processing on the object attribute features according to the feature category to obtain feature binning data; wherein, the feature binning data includes feature bins and preliminary features located in the feature bins; The feature association data acquisition module is used to acquire the association relationship between the preliminary features and the calibration labels to obtain feature association data; The sample proportion calculation module is used to calculate the sample proportion of the feature bin based on the feature association data, and obtain the positive sample proportion, negative sample proportion, and positive and negative sample proportion. The positive and negative sample difference calculation module is used to calculate positive and negative sample difference data based on the proportion of positive samples and the proportion of negative samples. The feature importance assessment module is used to assess feature importance based on the positive and negative sample difference data, the positive and negative sample ratio, and preset benchmark data. The sample proportion calculation module is used to calculate the sample proportion of the feature bin based on the feature association data, to obtain the positive sample proportion, negative sample proportion, and positive-negative sample proportion, including: The total number of samples is obtained based on the preliminary features and the feature-related data. Calculate the proportion of matching distribution data in the feature association data to obtain the proportion of positive samples; The proportion of non-matching distribution data in the feature association data is calculated to obtain the proportion of negative samples; wherein, the feature association data is obtained from the matching distribution data and the non-matching distribution data; The proportion of positive and negative samples is obtained by calculating the ratio of the feature-related data to the total number of samples.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
User value evaluation method and system
CN107239964A
Characteristic importance sorting method and device, equipment and storage medium
CN110738527A