Visual feature screening method, server and storage medium
By using visual feature screening methods in machine learning models and using tools such as variance methods and heat maps, the problem of low feature screening accuracy and interpretability is solved, and more efficient feature screening and model prediction accuracy are achieved.
Patent Information
- Application Number
- CN201910977284.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-12
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2039-10-12
AI Technical Summary
In prediction or classification models based on machine learning, the accuracy of the feature screening process is low and the interpretability is poor. Especially in a large amount of multi-dimensional feature data, how to screen out target features that are closely related to the prediction or classification results is an urgent problem that needs to be solved.
Provides a visual feature screening method. By obtaining numerical and non-numeric feature variables, it uses graphical tools such as variance method, radar chart, and heat map to display the mean value and correlation of feature variables, allowing users to participate in feature screening based on the graphical interface. process, remove feature variables that do not meet the preset conditions, and improve the accuracy and interpretability of feature screening.
This method improves the interpretability and accuracy of the feature screening process through intuitive graphical display, allowing users to intuitively understand the impact of feature variables on target variables, enhancing the interpretability of feature screening and improving the prediction accuracy of the model. sex.
Smart Images

Figure CN111178377B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a visualization feature screening method, a server and a computer storage medium. Background Art
[0002] In prediction or classification models based on machine learning, the historical data used to train the model is multidimensional data. The number of feature variables converted from these data is large, the total data volume is large, and it contains both continuous and discrete feature variables. How to filter out the target features that are closely related to the prediction or classification results from a large amount of feature data to make the model prediction or classification more accurate, and for users who do not understand the execution principle of machine learning, the black box-like screening process makes the feature screening poorly interpretable, which is a problem that needs to be solved urgently. Summary of the invention
[0003] The main purpose of the present invention is to provide a visual feature screening method, a server and a computer storage medium, aiming to solve the technical problems of low accuracy and low interpretability of feature screening for prediction or classification based on machine learning models in the prior art.
[0004] To achieve the above object, the present invention provides a visualization feature screening method, which comprises the following steps:
[0005] Acquire the data of the user within a preset period, and extract a first feature set, a second feature set, and a target variable from the data of the user according to the data type and the data identifier, wherein the first feature set includes numerical feature variables, the second feature set includes non-numerical feature variables, and the target variable is the classification result of the user;
[0006] Obtaining the variance of each feature variable in the first feature set, and removing the feature variables in the first feature set whose variance does not satisfy a first preset condition, to obtain a third feature set;
[0007] Draw and display a radar chart coordinate system in the display area, and based on the data of each type of user, respectively calculate the mean values corresponding to the feature variables in each third feature set, and draw polygons corresponding to the data of each type of user in the radar chart coordinate system according to the mean values;
[0008] receiving a first instruction, determining a target user according to the first instruction, obtaining a feature value corresponding to a feature variable of the target user in a third feature set, and drawing and displaying a polygon corresponding to the target user in the radar chart coordinate system according to the feature value;
[0009] Calculating a first degree of association between each feature variable in the second feature set and the third feature set, and calculating a second degree of association between each feature variable in the second feature set and the third feature set and the target variable;
[0010] Draw and display a corresponding heat map in the display area according to the first degree of association and the second degree of association, wherein the heat map includes a plurality of cells, each of the cells corresponds to the first degree of association or the second degree of association, and the cells are filled with a corresponding color according to the first degree of association or the second degree of association;
[0011] receiving a second instruction issued based on the heat map, and removing the feature variables indicated by the second instruction to be removed from the second feature set and the third feature set to obtain a fourth feature set;
[0012] The feature variables whose second association degree does not satisfy the second preset condition are removed from the fourth feature set.
[0013] Optionally, after the step of obtaining the variance of each feature variable in the first feature set and removing the feature variables whose variance does not satisfy a first preset condition in the first feature set to obtain the third feature set, the step further includes:
[0014] The Pearson correlation coefficient between each feature variable in the third feature set and the target variable is calculated, and the feature variables whose Pearson correlation coefficient is outside a preset coefficient threshold range are removed.
[0015] Optionally, the correlation degree is a mutual information value, and the second preset condition is that the mutual information value is less than a mutual information threshold.
[0016] Optionally, the user data is the user's financial data, and the step of obtaining the user's data within a preset period and extracting the first feature set from the user's data includes:
[0017] Acquire financial data of the user within a preset period, and obtain a first numerical characteristic variable according to the financial data;
[0018] Performing year-on-year and / or month-on-month analysis on the financial data to obtain a second numerical characteristic variable;
[0019] The union of the first numerical feature variable and the second numerical feature variable is taken as the first feature set.
[0020] Optionally, after the step of obtaining the user data within a preset period, the step further includes:
[0021] Performing dimensionality reduction processing on the user's data to obtain data points of the user's data in a two-dimensional space;
[0022] A two-dimensional coordinate system is drawn in the display area, and the data points are displayed in the two-dimensional coordinate system.
[0023] Optionally, after the step of acquiring the user data within a preset period and extracting the first feature set, the second feature set and the target variable from the user data, the following step further comprises:
[0024] Draw and display in the display area a probability distribution diagram of each feature variable in the first feature set and the second feature set;
[0025] A third instruction based on the probability distribution graph is received, and the feature variables instructed to be removed by the third instruction are removed from the second feature set and the third feature set.
[0026] Optionally, after the step of acquiring the user data within a preset period and extracting the first feature set, the second feature set and the target variable from the user data, the following step further comprises:
[0027] receiving a fourth instruction, and acquiring a target feature variable indicated by the fourth instruction, wherein the target feature variable is a feature variable in the first feature set or the second feature set;
[0028] Obtaining characteristic values of the target characteristic variable at continuous time points;
[0029] A two-dimensional coordinate system is drawn in the display area, and characteristic values of the target characteristic variable at continuous time points are displayed in the two-dimensional coordinate system.
[0030] Optionally, after the step of removing the feature variables whose second association degree does not satisfy the second preset condition from the fourth feature set, the method further includes:
[0031] Acquire user data to be classified, and extract feature variables to be screened from the user data to be classified;
[0032] Matching the feature variables to be screened in the fourth feature set to obtain matching feature variables;
[0033] Inputting the matched feature variables into a preset classification model for processing to obtain a user classification result;
[0034] For each matching characteristic variable of each type of user, a corresponding statistical feature is obtained, and a corresponding box plot is drawn in the display area according to the statistical feature, wherein the statistical feature includes a maximum value, a minimum value, a median, and two quartiles.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a server, which includes: a memory, a processor, and a visual feature screening processing program stored in the memory and executable on the processor, wherein the visual feature screening processing program implements the steps of the visual feature screening method as described above when executed by the processor.
[0036] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer storage medium, characterized in that a processing program for visual feature screening is stored on the computer storage medium, and when the processing program for visual feature screening is executed by a processor, the steps of the visual feature screening method as described above are implemented.
[0037] A visual feature screening method, server and computer storage medium proposed in an embodiment of the present invention extract numerical feature variables and non-numerical feature variables from user data within a preset period, first screen the numerical feature variables using a variance method, and display the mean values of feature variables of different types of users in a radar chart, then calculate the correlation between the screened feature variables and between the feature variables and the target variables and display them in a heat map, and screen the feature variables again according to instructions issued based on the heat map and preset conditions. This visual screening method that graphically displays the mean values of feature variables, the correlation between feature variables, and the correlation between feature variables and the target variables can not only intuitively display how feature variables affect target variables, but also allow staff to directly participate in the feature screening process based on the graphical display, which increases the interpretability of the feature screening process and improves the accuracy of feature screening. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of a server involved in an embodiment of the present invention;
[0039] Figure 2 It is a schematic diagram of the flow chart of the first embodiment of the visual feature screening method of the present invention;
[0040] Figure 3 It is a radar chart in the first embodiment of the visual feature screening method of the present invention;
[0041] Figure 4 A heat map in the first embodiment of the visual feature screening method of the present invention;
[0042] Figure 5 It is a schematic diagram of the flow chart of the second embodiment of the visual feature screening method of the present invention;
[0043] Figure 6 It is a dimension-reduced two-dimensional graph in the third embodiment of the visual feature screening method of the present invention;
[0044] Figure 7 It is a probability distribution diagram in the fourth embodiment of the visual feature screening method of the present invention;
[0045] Figure 8 It is a time series diagram of feature variables in the fifth embodiment of the visual feature screening method of the present invention;
[0046] Fig. 9 This is a box plot in the sixth embodiment of the visual feature screening method of the present invention.
[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0049] The main solution of the embodiment of the present invention is: obtaining the data of users within a preset period, extracting a first feature set, a second feature set and a target variable from the data of the users according to the data type and the data identifier, wherein the first feature set includes numerical feature variables, the second feature set includes non-numerical feature variables, and the target variable is the classification result of the user; obtaining the variance of each feature variable in the first feature set, and removing the feature variables whose variances in the first feature set do not meet the first preset condition to obtain a third feature set; drawing and displaying a radar chart coordinate system in a display area, and based on the data of each type of user, respectively calculating the mean corresponding to the feature variables in each third feature set, and drawing a polygon corresponding to the data of each type of user in the radar chart coordinate system according to the mean; receiving a first instruction, determining a target user according to the first instruction, and obtaining the feature variable of the target user in the third feature set. The method comprises the following steps: calculating a first correlation between each feature variable in the second feature set and the third feature set, and calculating a second correlation between each feature variable in the second feature set and the third feature set and the target variable; drawing and displaying a corresponding heat map in the display area according to the first correlation and the second correlation, wherein the heat map includes a plurality of cells, each of which corresponds to the first correlation or the second correlation, and filling the cells with corresponding colors according to the first correlation or the second correlation; receiving a second instruction issued based on the heat map, removing the feature variables indicated by the second instruction to be removed from the second feature set and the third feature set, and obtaining a fourth feature set; and removing the feature variables whose second correlation does not satisfy the second preset condition from the fourth feature set.
[0050] The present invention provides a feature screening method for a bond default model, which extracts numerical feature variables and non-numerical feature variables based on user data within a preset period, first screens the numerical feature variables using a variance method, and displays the mean values of feature variables of different types of users in a radar chart, then calculates the correlation between the screened feature variables and between the feature variables and target variables and displays them in a heat map, and screens the feature variables again according to instructions issued based on the heat map and preset conditions. This visual screening method that graphically displays the mean values of feature variables, the correlation between feature variables, and the correlation between feature variables and target variables can not only intuitively display how feature variables affect target variables, but also allows staff to directly participate in the feature screening process based on the graphical display, which increases the interpretability of the feature screening process and improves the accuracy of feature screening.
[0051] like Figure 1 As shown, Figure 1 It is a schematic diagram of the structure of a server involved in an embodiment of the present invention.
[0052] like Figure 1 As shown, the server may include: a processor 1001, such as a CPU, a communication bus 1002, and a memory 1003. The communication bus 1002 is used to realize the connection and communication between these components. The memory 1003 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1003 may also be a storage device independent of the aforementioned processor 1001.
[0053] Those skilled in the art will understand that Figure 1 The server structure shown in the figure does not constitute a limitation on the server, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0054] like Figure 1 As shown, the memory 1003 as a computer storage medium may include an operating system and a processing application of the visual feature screening method.
[0055] Reference Figure 2 The first embodiment of the present invention provides a visual feature screening method, the method comprising the following steps:
[0056] Step S10, obtaining the user's data within a preset period, and extracting a first feature set, a second feature set, and a target variable from the user's data according to the data type and the data identifier, wherein the first feature set includes numerical feature variables, the second feature set includes non-numerical feature variables, and the target variable is the classification result of the user;
[0057] In this embodiment, the user is a company user, and the user's data is the company's financial data. The company's financial data is divided into multiple categories, including the company's financial report data, stock change data, company executive public opinion data, industry data, and historical default data. Each category of financial data contains a variety of data content, for example, financial report data includes sales revenue, net main business income, total liabilities, and total current assets, etc., stock change data includes shareholder pledge data, shareholder reduction data, etc., company executive public opinion data includes executive violation records, business suspension and bankruptcy records, and acquisition and reorganization data, etc., industry data includes industry default rates, and historical default data includes the same type of bond violation records and the same company's bond default records. Different types of financial data have different preset periods. The preset period can be in years or months, for example, two years as a preset period or six months as a preset period.
[0058] Each category of financial data is identified by a unique data identifier, which can be an ID number or a category name. The data type of each category of financial data can be pre-labeled, or the features of the financial data can be extracted through a recognition model, and the data type of the financial data can be automatically identified based on the features of the identified financial data, where the data type includes numeric and non-numeric types.
[0059] Therefore, after separating the company's financial report data and stock change data from the company's financial data according to the data identifier, it is identified as numerical data according to its corresponding data type, and then numerical calculation processing is performed on it to obtain the first feature set, which contains all numerical feature variables.
[0060] After classifying the company's executive public opinion data, industry data and historical default data from the company's financial data according to data identifiers, since the company's executive public opinion data, industry data and historical default data are all evaluation type or description type information data reflecting the company's financial status, they can be identified as non-numeric data according to their corresponding data types, and then semantic analysis is performed to obtain a second feature set, which contains all non-numeric feature variables.
[0061] It should be noted that the data of users within the preset period obtained in this embodiment are data of multiple users, that is, financial data of multiple companies, and these financial data have time dimensions and feature dimensions. For example, if the financial data comes from 4,000 companies, then for each category of financial data, such as financial report data, there are 4,000 financial report data. If the financial report data can be further subdivided into 64 subcategories, each subcategory can be regarded as a feature, and for each feature, there are corresponding feature values from 4,000 companies. Therefore, these 4,000 feature values constitute a feature variable as a whole, and the analysis and processing of the financial report data can obtain 64 feature variables, each of which corresponds to 4,000 feature values. If the preset period is five years, the financial report data of 4,000 companies within five years is obtained, and the data of each subcategory is monthly data, then the dimension of each feature value is 5*12, that is, each feature value has 60 data points.
[0062] Taking the processing of financial report data as an example, the company's total liabilities and total assets can be obtained from the financial report data. The company's debt-to-asset ratio can be obtained based on the ratio of total liabilities to total assets. The debt-to-asset ratio is a characteristic variable that reflects how much of the company's total assets are obtained through borrowing; the company's sales revenue and average accounts receivable can be obtained from the financial report data. The company's accounts receivable turnover rate can be obtained based on the ratio of sales revenue to average accounts receivable. The accounts receivable turnover rate is a characteristic variable that reflects the company's short-term debt repayment ability; the company's net operating income and average total current assets can be obtained from the financial report data. The company's current asset turnover rate can be obtained based on the ratio of net operating income to average total current assets. The current asset turnover rate is a characteristic variable that reflects the company's asset utilization.
[0063] It is understandable that before extracting feature variables from a company's financial report data and stock change data, these data need to be preprocessed, where the preprocessing includes operations such as deleting outliers and filling missing data.
[0064] Financial report data, stock change data, company executives' public opinion data, industry data and historical default data are preprocessed to obtain the feature variable. For example, if these data come from 4,000 companies, the financial report data contains 64 feature variables, the stock change data includes 5 feature variables, the company executives' public opinion data, shareholder pledge data and historical default data contain a total of 8 feature variables, then a feature variable matrix with a dimension of 4000*77 can be obtained.
[0065] Furthermore, more feature variables can be obtained as training data for the bond default risk assessment model through the following steps: 1) obtaining the company's financial data within a preset period, and obtaining a first numerical feature variable based on the financial data; 2) performing year-on-year and / or month-on-month comparison on the financial data to obtain a second numerical feature variable; 3) taking the union of the first numerical feature variable and the second numerical feature variable as the first feature set.
[0066] For example, the equity data attributable to the shareholders of the parent company in different periods can be compared on a quarter-on-quarter basis to obtain the equity change value attributable to the shareholders of the parent company. Specifically, the time period T1 is set to one quarter, and the data D1, D2, D3 and D4 of four consecutive quarters of 2018 for each parent company are obtained. The quarter-on-quarter growth rate of the second quarter is obtained according to (D2-D1) / D1*100%, and so on to obtain the quarter-on-quarter growth rates of the third and fourth quarters.
[0067] In this embodiment, the visual feature screening method is applied to the bond default model, which uses the feature variables obtained based on the financial data of the target company user as input to predict the bond default result of the target company user. Therefore, the target variable of the bond default model is the bond default result of the company user, which is also equivalent to the classification result of the company user. The bond default result can be a binary classification result, such as "default" or "non-default", or a bond default risk level, such as "high default risk", "medium default risk" or "low default risk".
[0068] It should be noted that the financial data of the companies processed in this embodiment are historical data. Therefore, for each of the companies, the classification result of the company has been marked in advance as "default" or "non-default", "high default risk", "medium default risk" or "low default risk".
[0069] Step S20, obtain the variance of each feature variable in the first feature set, and remove the feature variables in the first feature set whose variance does not meet the first preset condition, to obtain a third feature set; a large variance of a feature variable indicates that the feature variable is relatively divergent, so that the target information can be measured according to the difference in the value of the feature variable. For example, if the variance of a feature is close to zero, that is, all samples have very close values in this feature, then this feature has very little effect on model training and should be discarded, so the first preset condition is greater than the preset variance threshold.
[0070] The variance of each feature variable in the first feature set is calculated, and the feature variables in the first feature set that are less than or equal to a preset variance threshold are removed to obtain a third feature set. The variances of the feature variables in the third feature set are all greater than the preset variance threshold.
[0071] It should be noted that if the user data within the preset period comes from multiple companies, for example 4,000 companies, and the preset period is 5 years, and the data of each feature variable in the first feature set is monthly data, then when calculating the variance of each feature variable in the first feature set, the variance is calculated based on data of 4000*5*12 dimensions.
[0072] Step S30, drawing and displaying a radar chart coordinate system in the display area, and based on the data of each type of user, respectively calculating the mean values corresponding to the feature variables in each third feature set, and drawing polygons corresponding to the data of each type of user in the radar chart coordinate system according to the mean values;
[0073] like Figure 3 As shown, the characteristic variables included in the third characteristic set are: debt-to-asset ratio, year-on-year growth rate of operating income, working capital turnover rate, times of interest earned, ratio of tangible assets to interest-bearing debt, cash ratio, ratio of current liabilities to total liabilities, and ratio of equity attributable to parent company shareholders to total invested capital. The mean values corresponding to these characteristic variables in the third characteristic set for "non-default" (i.e. normal) company users are calculated, and corresponding polygons are drawn and displayed in the radar chart coordinate system based on the mean values; and the mean values corresponding to these variables in the third characteristic set for "default" company users are calculated, and corresponding polygons are drawn and displayed in the radar chart coordinate system based on the mean values.
[0074] Step S40, receiving a first instruction, determining a target user according to the first instruction, and obtaining a feature value corresponding to a feature variable of the target user in a third feature set, and drawing and displaying a polygon corresponding to the target user in the radar chart coordinate system according to the feature value;
[0075] The visual feature screening method proposed in this embodiment is applied to a feature screening device, which includes a processor, a memory, and a display. The feature screening device is used by staff to perform visual feature screening.
[0076] When the display of the feature screening device shows the polygon corresponding to each type of user data in the radar coordinate system, for example, when the staff sees Figure 3 When the polygons corresponding to the "non-default" (i.e. normal) company user data and the polygons of the "default" company user data are displayed in the radar coordinate system, if the staff hopes to see the polygon corresponding to a certain company user data in the radar coordinate system, they can issue a first instruction through the touch display, voice or keyboard to instruct the feature screening device to display the polygon corresponding to the company user data.
[0077] like Figure 3As shown, the feature screening device determines a certain company user according to the received first instruction, and calculates the feature value corresponding to the feature variable of the company user in the third feature set, and draws and displays the polygon corresponding to the company user in the radar chart coordinate system according to the feature value;
[0078] Step S50, calculating a first degree of association between each feature variable in the second feature set and the third feature set, and calculating a second degree of association between each feature variable in the second feature set and the third feature set and the target variable.
[0079] In this embodiment, the characteristic variables of the company user to be predicted are input into the bond default model to predict the bond default result of the company according to the characteristic variables screened by visualization. The correlation between the characteristic variable and the target variable refers to the influence of the characteristic variable on the correct prediction of the bond default model. The greater the correlation, the greater the influence of the characteristic variable on the prediction result of the bond default model. Conversely, the smaller the correlation, the smaller the influence of the characteristic variable on the prediction result of the bond default model.
[0080] Therefore, in this step, the correlation between each feature variable is calculated first. If the correlation between two feature variables is high, one of them needs to be removed, and the one with low correlation with the target variable is removed.
[0081] The method for calculating the degree of association between variables can be: calculating the Pearson correlation coefficient between the variables, using the Pearson correlation coefficient as the degree of association, in which case there is a preset Pearson correlation coefficient threshold range; or mapping all variables to the vector space, calculating the distance between the variables, using the distance as the degree of association, in which case the degree of association threshold is the distance threshold; or calculating the mutual information value between the variables, using the mutual information value as the degree of association, in which case the degree of association threshold is the mutual information threshold. Preferably, in this embodiment, on the one hand, since the MIC algorithm (maximum mutual information value algorithm) can discretize continuous feature variables, and since the feature variables for which the degree of association is to be calculated include both continuous feature variables and discrete feature variables, the MIC algorithm can be used to process these two types of feature variables at the same time; on the other hand, there are both linear and nonlinear relationships between the feature variables and the target variables, and the MIC algorithm can capture both linear and nonlinear relationships at the same time, so the MIC algorithm is used to calculate the characteristics of the linear and nonlinear relationships between the feature variables and the target variables.
[0082] The steps of using the MIC algorithm to calculate the mutual information value pairs between each feature variable X in the second feature set and the third feature set, and between X and the target variable Y are as follows:
[0083] 1) Take the input feature variable X and the corresponding target variable Y as sample data to form a scatter plot of the sample data;
[0084] The dimension of the target variable Y is the same as that of the feature variable X. The two are combined to obtain a two-dimensional variable matrix [X, Y]. Each two-dimensional element in this variable matrix is regarded as a data point, and these data points are distributed in a two-dimensional space.
[0085] 2) Grid the scatter plot consisting of sample data into m rows and n columns to obtain the probability distribution value;
[0086] The frequency of data points falling in the (x, y)th grid is used as an estimate of P(x, y) according to the following formula:
[0087] P(x,y) = number of data points in the (x,y)th grid / total number of data points
[0088] The frequency of the data points falling in the xth row is used as the estimate of P(x), and the estimate of P(y) is obtained similarly.
[0089] 3) Calculate the maximum mutual information value of X and Y according to the probability distribution value.
[0090] The mutual information between the feature variable X and the target variable Y is calculated according to the following formula, and the normalization factor is used to convert the value of the mutual information into the (0,1) interval:
[0091]
[0092] 4) Because there is more than one way to divide the data points into an m times n grid, calculate the MIC value under each grid division method, and select the MIC value corresponding to the grid resolution that can maximize the normalized mutual information as the mutual information value of the feature variable X and the target variable Y.
[0093] In the screening process of this step, the linear and nonlinear relationship between the characteristic variables and the target variables is comprehensively considered, and finally the characteristic variables that are most useful for estimating the target are obtained, which can improve the accuracy of the bond default model in predicting the company's bond default results.
[0094] Step S60, drawing and displaying a corresponding heat map in the display area according to the first correlation degree and the second correlation degree, wherein the heat map includes a plurality of cells, each of the cells corresponds to the first correlation degree or the second correlation degree, and the cells are filled with a corresponding color according to the first correlation degree or the second correlation degree;
[0095] like Figure 4As shown in the heat map, the first correlation between multiple characteristic variables (including the ratio of administrative expenses to total operating income, accounts receivable turnover rate, accounts receivable turnover days, equity multiplier, etc.) is calculated. The color information of each square cell in the heat map represents the correlation between two characteristic variables. The darker the color of the cell, the greater the correlation.
[0096] Step S70, receiving a second instruction issued based on the heat map, removing the feature variables indicated by the second instruction to be removed from the second feature set and the third feature set, to obtain a fourth feature set;
[0097] When the display of the feature screening device shows the first heat map corresponding to the first correlation and the second heat map corresponding to the second correlation, if the staff finds that the correlation between feature variable 1 and feature variable 2 is very high when viewing the first heat map, one of them needs to be removed, and then the staff finds that the correlation between feature variable 2 and the target variable is lower than the correlation between feature variable 1 and the target variable when viewing the second heat map, a second instruction is issued by touching the display, voice or keyboard to instruct the feature screening device to remove feature variable 2. The feature screening device removes feature variable 2 from the feature set to which it belongs according to the received second instruction.
[0098] Step S80: removing the feature variables whose second association degree does not satisfy the second preset condition from the fourth feature set.
[0099] After obtaining the correlation between the characteristic variable and the target variable, the second preset condition may be that the correlation between the characteristic variable and the target variable is greater than or equal to a preset correlation threshold, or that the correlation between the characteristic variable and the target variable is within a preset correlation range, or that the characteristic variables are arranged in descending order from large to small according to the correlation, and a preset number of characteristic variables are selected therefrom.
[0100] In this embodiment, numerical feature variables and non-numerical feature variables are extracted from user data within a preset period, the numerical feature variables are first screened using the variance method, and the mean values of the feature variables of different types of users are displayed in a radar chart. The correlations between the screened feature variables and between the feature variables and the target variables are calculated and displayed in a heat map. The feature variables are screened again according to the instructions issued based on the heat map and the preset conditions. This visual screening method that graphically displays the mean values of the feature variables, the correlations between the feature variables, and the correlations between the feature variables and the target variables can not only intuitively show how the feature variables affect the target variables, but also the staff can directly participate in the feature screening process based on the graphical display, which increases the interpretability of the feature screening process and improves the accuracy of feature screening.
[0101] Further, see Figure 5The second embodiment of the present invention provides a visual feature screening method based on the first embodiment. After step S20, this embodiment further includes:
[0102] Step S90, calculating the Pearson correlation coefficient between each feature variable in the third feature set and the target variable, and removing the feature variables whose Pearson correlation coefficient is outside a preset coefficient threshold range.
[0103] The characteristic variables of the bond default model are derived from the processing of the company's financial data within a preset period. The financial data is divided into many categories, including the company's financial report data, stock change data, company executives' public opinion data, industry data, and historical default data. Each category of financial data contains a variety of data content, and each type of data can obtain a characteristic variable. Therefore, the number of characteristic variables of the bond default model to be screened is large.
[0104] The third feature set in step S20 still contains a large number of feature variables. In order to screen out the most valuable feature variables for predicting the target variable from the large number of feature variables, and because the third feature set contains only numerical variables, and the relationship between the numerical variables and the target variables is a linear relationship, and the Pearson correlation coefficient can be used to calculate the linear relationship, in this step, the Pearson correlation coefficient between each feature variable in the third feature set and the target variable can be calculated, and the feature variables that have little effect on the prediction of the target variable can be further removed according to the Pearson correlation coefficient.
[0105] The characteristic variables screened out in this step will be screened and removed again in steps S70 and S80, and finally the most valuable characteristic variables for predicting the target variable can be selected.
[0106] In this embodiment, the Pearson correlation coefficient between each feature variable in the third feature set and the target variable is calculated, and the feature variables whose Pearson correlation coefficient is less than the coefficient threshold are removed. That is, different feature screening methods are used for feature variables of numerical type and feature variables of non-numerical type, respectively. In particular, more levels of feature screening are performed for feature variables of numerical type. In the screening process, the linear and nonlinear relationships between the feature variables and the target variables are comprehensively considered, thereby reducing the feature loss rate and improving the accuracy of feature variable screening.
[0107] Furthermore, the third embodiment of the present invention provides a visual feature screening method based on the first embodiment or the second embodiment, and this embodiment further includes, after step 10:
[0108] Step S100, performing dimensionality reduction processing on the user's data to obtain data points of the user's data in a two-dimensional space;
[0109] Step S110 , drawing a two-dimensional coordinate system in the display area, and displaying the data points in the two-dimensional coordinate system.
[0110] like Figure 6 As shown, the multi-dimensional data of non-defaulting corporate users and defaulting corporate users are reduced to two dimensions using the TSNE (t-distributed stochastic neighbor embedding) dimensionality reduction algorithm, and the distribution graph of the reduced-dimensional data is displayed in a two-dimensional coordinate system. When the display of the feature screening device displays the two-dimensional distribution graph corresponding to the reduced-dimensional data, the staff can intuitively understand whether there is a clear boundary between the data of defaulting corporate users and the data of non-defaulting corporate users.
[0111] It should be noted that for the multidimensional data of company users, each dimension of data corresponds to a characteristic variable.
[0112] Furthermore, for each feature variable screened out in the above steps S20, S70 and S80, a dimensionality reduction process can be performed, and a distribution diagram of the feature variables after dimensionality reduction of different categories of company users can be drawn or displayed in the display area. The staff can determine whether features effective for predicting the target variable have been screened out by checking whether there are obvious boundaries between the data of different categories of company users at this time. That is, if there are obvious boundaries, effective features have been screened out; if there are no obvious boundaries, further screening is required.
[0113] In this embodiment, by performing dimensionality reduction processing on the user data and displaying it, it is possible to intuitively show whether there are clear boundaries between different categories of user data, and it is possible to intuitively show the effectiveness of the characteristic variables corresponding to the user data in predicting the target variables.
[0114] Furthermore, the fourth embodiment of the present invention provides a visual feature screening method based on the first embodiment or the second embodiment, and this embodiment further includes, after step 10:
[0115] Step S120, drawing and displaying probability distribution diagrams of each feature variable in the first feature set and the second feature set in the display area;
[0116] Step S130: receiving a third instruction based on the probability distribution graph, and removing the feature variables indicated by the third instruction to be removed from the second feature set and the third feature set.
[0117] like Figure 7As shown, the feature set includes feature variables such as tangible assets, the ratio of tangible assets to total liabilities, and diluted earnings per share at the end of the period. The probability distribution diagrams of these feature variables are drawn and displayed in the display area. When the display of the feature screening device displays the probability distribution diagram of these feature variables, if the staff member does not show a regular distribution of the feature variable "tangible assets" when viewing the probability distribution diagram, it is considered that it will not contribute to the target prediction, and a third instruction is issued by touching the display, voice or keyboard to instruct the feature screening device to remove the feature variable "tangible assets". The feature screening device removes the feature variable "tangible assets" from the feature set to which it belongs according to the received third instruction.
[0118] In this embodiment, by drawing and displaying the probability distribution of the feature variables in the display area, the feature variables are screened again according to the instructions issued based on the probability distribution diagram. This visual screening method that graphically displays the probability distribution of the feature variables allows the staff to directly remove the feature variables that do not contribute to the target prediction based on the probability density distribution of the feature variables, further increasing the interpretability of the feature screening process and improving the accuracy of feature screening.
[0119] Furthermore, the fifth embodiment of the present invention provides a visual feature screening method based on the first embodiment or the second embodiment, and this embodiment further includes, after step 10:
[0120] Step S140, receiving a fourth instruction, and obtaining a target feature variable indicated by the fourth instruction, wherein the target feature variable is a feature variable in the first feature set or the second feature set;
[0121] Step S150, obtaining characteristic values of the target characteristic variable at continuous time points;
[0122] Step S160, drawing a two-dimensional coordinate system in the display area, and displaying characteristic values of the target characteristic variable at continuous time points in the two-dimensional coordinate system.
[0123] like Figure 8 As shown in the figure, the horizontal axis is the time axis, and the vertical axis is the value of the target feature variable at each continuous time point. By observing the changes in the values of the target feature variable at continuous time points, it is possible to determine whether the data changes are related to time. For example, profits are generally lower in spring and higher in winter. This method helps determine whether it is necessary to calculate year-on-year or month-on-month growth based on the data of the feature variable to eliminate the impact of time on the feature variable.
[0124] In this embodiment, by displaying the characteristic values of the characteristic variables at continuous time points in the display area, the staff can intuitively judge whether the data changes of the characteristic variables are related to time, and determine whether to calculate the year-on-year or month-on-month changes of the characteristic variables, thereby obtaining data that is more conducive to feature screening.
[0125] Furthermore, the sixth embodiment of the present invention provides a visual feature screening method based on the first embodiment or the second embodiment, and this embodiment further includes, after step 80:
[0126] Step S170, obtaining user data to be classified, and extracting feature variables to be screened from the user data to be classified;
[0127] Step S180, matching the feature variables to be screened in the fourth feature set to obtain matching feature variables;
[0128] Step S190, inputting the matched feature variables into a preset classification model for processing to obtain a user classification result;
[0129] Step S200, for each matching characteristic variable of each type of user, obtain corresponding statistical features, and draw corresponding box plots in the display area according to the statistical features, wherein the statistical features include a maximum value, a minimum value, a median, and two quartiles.
[0130] like Fig. 9 As shown in the figure, some examples of box plots of the statistical characteristics of feature variables are given. In the display area, the box plots corresponding to the data of multiple feature variables are arranged in parallel, intuitively showing the distribution information of the data of each feature variable, such as the median, tail length, outliers, and distribution interval. The size of the interquartile range of the data of each feature variable, whether the distribution of normal values is concentrated or dispersed, or the skewness of the data distribution can be basically estimated by observing the length of each box and line segment.
[0131] In this embodiment, by drawing and displaying the box plot corresponding to the statistical characteristics of the feature variables in the display area, the staff can directly observe and compare the distribution characteristics of multiple feature variables, thereby further improving the interpretability of the feature screening process.
[0132] Furthermore, the sixth embodiment of the present invention provides a visualization feature screening method based on the first embodiment, and the visualization feature screening method is applied to a bond default model. After step S80, this embodiment further includes:
[0133] Step S210: input the third feature set and the fourth feature set into the bond default model for processing, and train the parameters in the bond default model.
[0134] The bond default model is a machine learning model that can be built based on neural networks, deep neural networks, vector machines or random forest algorithms.
[0135] In this embodiment, the third feature set and the fourth feature set after the removal operation are obtained, and the feature variables in the two sets are input into the bond default model as sample data to train the parameters in the bond default model.
[0136] Once the bond default model is trained, the company's bond default risk can be predicted according to the following steps:
[0137] Step S220, obtaining data of the user to be predicted, and obtaining feature variables to be screened according to the data of the user to be predicted;
[0138] Obtain the financial data of the company users to be predicted within the preset period. The financial data has a time dimension and a feature dimension. Each feature dimension is regarded as a feature variable to be screened. Each feature variable corresponds to a subclass of the financial data. For example, if the preset period is five years, and the data of each subclass is monthly data, then each feature variable is 5*12 dimensional data.
[0139] Step S230, matching the feature variables to be screened in the third feature set and the fourth feature set respectively to obtain matching feature variables;
[0140] For example, if the feature variable set to be screened is {A, B, C, D, E, F, G}, the feature variables contained in the first feature set are {A, B}, and the feature variables contained in the second feature set are {E, G}, then the matching feature variables are {A, B, E, G};
[0141] Step S240: input the matched feature variables into the bond default model for processing, and predict the classification result of the user to be predicted.
[0142] In this embodiment, the third feature set and the fourth feature set are input into the bond default model for processing, and the parameters in the bond default model are trained to obtain a bond default model with high prediction accuracy.
[0143] The present invention also provides a server, which includes: a memory, a processor, and a visual feature screening processing program stored in the memory and executable on the processor, wherein the visual feature screening processing program implements the steps of the visual feature screening method when executed by the processor.
[0144] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a processing program for visual feature screening is stored. When the processing program for visual feature screening is executed by a processor, the steps of the visual feature screening processing method are implemented.
[0145] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0146] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for a terminal server (which can be a mobile phone, computer, server, or network server, etc.) to execute the methods described in each embodiment of the present invention.
[0148] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A visual feature screening method, characterized in that: The visual feature screening method comprises the following steps: Acquire the data of the user within a preset period, and extract a first feature set, a second feature set, and a target variable from the data of the user according to the data type and the data identifier, wherein the first feature set includes numerical feature variables, the second feature set includes non-numerical feature variables, and the target variable is the classification result of the user; Obtaining the variance of each feature variable in the first feature set, and removing the feature variables in the first feature set whose variance does not satisfy a first preset condition, to obtain a third feature set; Draw and display a radar chart coordinate system in the display area, and based on the data of each type of user, respectively calculate the mean values corresponding to the feature variables in each third feature set, and draw polygons corresponding to the data of each type of user in the radar chart coordinate system according to the mean values; receiving a first instruction, determining a target user according to the first instruction, obtaining a feature value corresponding to a feature variable of the target user in a third feature set, and drawing and displaying a polygon corresponding to the target user in the radar chart coordinate system according to the feature value; Calculating a first degree of association between each feature variable in the second feature set and the third feature set, and calculating a second degree of association between each feature variable in the second feature set and the third feature set and the target variable; Draw and display a corresponding heat map in the display area according to the first degree of association and the second degree of association, wherein the heat map includes a plurality of cells, each of the cells corresponds to the first degree of association or the second degree of association, and the cells are filled with a corresponding color according to the first degree of association or the second degree of association; receiving a second instruction issued based on the heat map, and removing the feature variables indicated by the second instruction to be removed from the second feature set and the third feature set to obtain a fourth feature set; The feature variables whose second association degree does not satisfy the second preset condition are removed from the fourth feature set.
2. The visual feature screening method according to claim 1, characterized in that: After the step of obtaining the variance of each feature variable in the first feature set and removing the feature variables whose variance does not satisfy the first preset condition in the first feature set to obtain the third feature set, the following step further comprises: The Pearson correlation coefficient between each feature variable in the third feature set and the target variable is calculated, and the feature variables whose Pearson correlation coefficient is outside a preset coefficient threshold range are removed.
3. The visual feature screening method according to claim 1, characterized in that: The correlation degree is a mutual information value, and the second preset condition is that the mutual information value is less than a mutual information threshold.
4. The visual feature screening method according to claim 1, characterized in that: The user data is the user's financial data, and the step of obtaining the user's data within a preset period and extracting a first feature set from the user's data includes: Acquire financial data of the user within a preset period, and obtain a first numerical characteristic variable according to the financial data; Performing year-on-year and / or month-on-month analysis on the financial data to obtain a second numerical characteristic variable; The union of the first numerical feature variable and the second numerical feature variable is taken as the first feature set.
5. The visual feature screening method according to any one of claims 1 to 4, characterized in that: After the step of obtaining the user data within the preset period, the following step is further included: Performing dimensionality reduction processing on the user's data to obtain data points of the user's data in a two-dimensional space; A two-dimensional coordinate system is drawn in the display area, and the data points are displayed in the two-dimensional coordinate system.
6. The visual feature screening method according to any one of claims 1 to 4, characterized in that: After the step of obtaining the user data within a preset period and extracting the first feature set, the second feature set and the target variable from the user data, the following steps are further included: Draw and display in the display area a probability distribution diagram of each feature variable in the first feature set and the second feature set; A third instruction based on the probability distribution graph is received, and the feature variables instructed to be removed by the third instruction are removed from the second feature set and the third feature set.
7. The visual feature screening method according to any one of claims 1 to 4, characterized in that: After the step of obtaining the user data within a preset period and extracting the first feature set, the second feature set and the target variable from the user data, the following steps are further included: receiving a fourth instruction, and acquiring a target feature variable indicated by the fourth instruction, wherein the target feature variable is a feature variable in the first feature set or the second feature set; Obtaining characteristic values of the target characteristic variable at continuous time points; A two-dimensional coordinate system is drawn in the display area, and characteristic values of the target characteristic variable at continuous time points are displayed in the two-dimensional coordinate system.
8. A visual feature screening method according to any one of claims 1 to 4, characterized in that: After the step of removing the feature variables whose second association degree does not satisfy the second preset condition from the fourth feature set, the following step further comprises: Acquire user data to be classified, and extract feature variables to be screened from the user data to be classified; Matching the feature variables to be screened in the fourth feature set to obtain matching feature variables; Inputting the matched feature variables into a preset classification model for processing to obtain a user classification result; For each matching characteristic variable of each type of user, a corresponding statistical feature is obtained, and a corresponding box plot is drawn in the display area according to the statistical feature, wherein the statistical feature includes a maximum value, a minimum value, a median, and two quartiles.
9. A server, characterized in that: The server includes: a memory, a processor, and a visualization feature variable screening processing program stored in the memory and executable on the processor, wherein the visualization feature variable screening processing program implements the steps of the visualization feature variable screening method as described in any one of claims 1 to 6 when executed by the processor.
10. A storage medium, characterized in that: The storage medium stores a processing program for visual feature variable screening, and when the processing program for visual feature variable screening is executed by a processor, the steps of the visual feature variable screening method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Pre-loan risk analysis method, device and equipment and readable storage medium
CN110276552A
System and method for updating a digital map in a driver assistance system
US20140025292A1
Apparatus and method for establishing prediction model, program for establishing prediction model, and computer-readable storage medium
WO2019019255A1
