A feature selection method and device
Through the sparse feature selection algorithm with global redundancy minimized, the problem of being unable to minimize the redundancy of high-dimensional data features and selecting strong discriminant features in the prior art is solved, and the unity of feature selection and redundant information is realized. Improved performance of clustering and classification tasks.
Patent Information
- Application Number
- CN202011351263.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-25
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2040-11-25
AI Technical Summary
The prior art cannot minimize global feature redundancy in high-dimensional data, and cannot select features with strong discrimination, affecting subsequent clustering or classification tasks.
A sparse feature selection algorithm with global redundancy minimization is used to characterize the redundancy between features through redundancy matrix, and a norm regularization unified feature selection and redundancy information are minimized into a convex target optimization function.
Feature selection and global redundant information are effectively realized, and representative and non-redundant features are selected to improve the performance of subsequent tasks.
Smart Images

Figure CN113761307B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a feature selection method and device. Background Art
[0002] With the development of information technology, global data has exploded, and more and more data needs to be stored and transmitted. In order to process massive high-dimensional data, it is very necessary to extract the most detailed and valuable information from it. Since high-dimensional data contains a large number of features, these features inevitably contain noise. In this case, feature selection becomes an indispensable data mining technology. Feature dimensionality reduction can improve the subsequent classification or clustering performance.
[0003] At present, there are three types of feature selection methods: filtering method, wrapping method and embedded method. In the process of implementing the present invention, the inventors found that these methods usually do not consider the redundancy between the selected features, so these features often have high correlation, which is not conducive to subsequent clustering or classification tasks. Although the mRMR (Max-Relevance and Min-Redundancy) feature selection method based on mutual information has been proposed to minimize the redundancy between features, the mRMR method adopts a greedy strategy to find features with minimum redundancy, resulting in the selected features not minimizing global redundant information. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a feature selection method and device, which can at least solve the problem that the redundancy of global features cannot be minimized and features with strong discriminability cannot be selected in the prior art.
[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a feature selection method is provided, comprising:
[0006] Determine the features in each sample, and construct a sample vector based on the values of all the features in each sample; wherein the sample is at least one of image, text, and speech data;
[0007] Processing the sample vector using a sparse feature selection algorithm with global redundancy minimization to obtain an importance score vector; wherein the importance score vector includes the importance score of each feature;
[0008] From the importance scores of the features, a predetermined number of features with the largest importance scores are extracted as the selected target features.
[0009] Optionally, the processing of the sample vector by using a sparse feature selection algorithm that minimizes global redundancy includes:
[0010] Determine the category to which each sample belongs, and input the sample vector, the category, the first importance score vector, the second importance score vector and the redundancy matrix into a sparse feature selection algorithm for global redundancy minimization for minimization; wherein the first importance score vector does not consider redundancy, and the second importance score vector considers redundancy; and
[0011] Constraining the elements in the second importance score vector; wherein the constraint condition is that the elements are non-zero and the sum is 1;
[0012] Get the second importance score vector after minimizing and constraining the elements.
[0013] Optionally, the sparse feature selection algorithm using global redundancy minimization is used to process the sample vector to obtain an importance score vector, including:
[0014] Processing the sample vector by using an evaluation criterion to calculate a first importance score of each feature without considering redundancy, thereby generating a first importance score vector;
[0015] A redundancy matrix is introduced, and the first importance score vector is input into a redundant information minimization criterion to perform redundancy correction on different features to obtain a second importance vector.
[0016] Optionally, also include:
[0017] Normalizing the values of a feature in different samples to construct a feature vector of the feature;
[0018] The inner product between the eigenvectors of two features is calculated to construct a redundancy matrix between the two features.
[0019] Optionally, normalizing the values of a feature in different samples to construct a feature vector of the feature includes:
[0020] Construct a data matrix based on the value of a feature in different samples;
[0021] The data matrix is processed using a centering matrix to obtain a centralized feature vector corresponding to the feature.
[0022] To achieve the above object, according to another aspect of an embodiment of the present invention, a feature selection device is provided, comprising:
[0023] A feature determination module, used to determine the features in each sample, and construct a sample vector based on the values of all features in each sample; wherein the sample is at least one of image, text, and voice data;
[0024] A vector processing module, used to process the sample vector using a sparse feature selection algorithm with global redundancy minimization to obtain an importance score vector; wherein the importance score vector includes the importance score of each feature;
[0025] The feature selection module is used to extract a predetermined number of features with the largest importance scores from the importance scores of the features as selected target features.
[0026] Optionally, the vector processing module is used to:
[0027] Determine the category to which each sample belongs, and input the sample vector, the category, the first importance score vector, the second importance score vector and the redundancy matrix into a sparse feature selection algorithm for global redundancy minimization for minimization; wherein the first importance score vector does not consider redundancy, and the second importance score vector considers redundancy; and
[0028] Constraining the elements in the second importance score vector; wherein the constraint condition is that the elements are non-zero and the sum is 6;
[0029] Get the second importance score vector after minimizing and constraining the elements.
[0030] Optionally, the vector processing module is used to:
[0031] Processing the sample vector by using an evaluation criterion to calculate a first importance score of each feature without considering redundancy, thereby generating a first importance score vector;
[0032] A redundancy matrix is introduced, and the first importance score vector is input into a redundant information minimization criterion to perform redundancy correction on different features to obtain a second importance vector.
[0033] Optionally, a redundant matrix building module is also included for:
[0034] Normalizing the values of a feature in different samples to construct a feature vector of the feature;
[0035] The inner product between the eigenvectors of two features is calculated to construct a redundancy matrix between the two features.
[0036] Optionally, the redundant matrix construction module is used to:
[0037] Construct a data matrix based on the value of a feature in different samples;
[0038] The data matrix is processed using a centering matrix to obtain a centralized feature vector corresponding to the feature.
[0039] To achieve the above objective, according to another aspect of an embodiment of the present invention, a feature selection electronic device is provided.
[0040] The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the feature selection methods described above.
[0041] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the feature selection methods described above is implemented.
[0042] According to the solution provided by the present invention, an embodiment of the above invention has the following advantages or beneficial effects: based on the redundant matrix, non-redundant features are characterized, norm regularization is used for the selection of data features, and feature selection and global redundant information minimization are unified into a convex objective optimization function to effectively realize feature selection.
[0043] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0045] Figure 1(a) to (c) are schematic diagrams of the existing three types of feature selection methods: wrapping, filtering, and embedded;
[0046] Figure 2 It is a schematic diagram of mRMR feature selection;
[0047] Figure 3 is a flow chart of a feature selection method according to an embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the global redundant information minimization method based on sparseness;
[0049] Figure 5 is a schematic diagram of main modules of a feature selection device according to an embodiment of the present invention;
[0050] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0051] Figure 7 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0053] Feature selection has been widely used in many different fields, such as disease gene selection in medical research and image segmentation in computer vision. Using a small number of features with very rich representation capabilities can not only accelerate the learning process of the model, but also enhance the generalization ability of the model on unknown data.
[0054] At present, there are three main methods used in feature selection. Their advantages and disadvantages are analyzed as follows:
[0055] 1) Filtering feature selection methods (as shown in Figure 1(a)) rely on the inherent properties of the data to rank features, thereby selecting important features according to the ranking. It is worth noting that filtering methods are independent of the classifier, so they have lower computational cost, but usually have poorer performance.
[0056] 2) The wrapper feature selection method (as shown in Figure 1(b)) is associated with a specific classifier, so this method can usually achieve good performance, but it is not suitable for large-scale data due to its high computational cost.
[0057] 3) The learning process of the embedded feature selection method (as shown in Figure 1(c)) has been embedded in the classification model training, and the required features to be retained (i.e., the selected features) are finally obtained by solving the optimization problem of the classification algorithm.
[0058] Therefore, compared with the filtering feature selection method and the wrapping feature selection method, the embedded feature selection method can simultaneously achieve lower computational cost and satisfactory feature selection performance.
[0059] See also Figure 2As shown in the figure, it is a schematic diagram of mRMR feature selection. There are four different features on the left, and the feature importance scores are: 0.95, 0.91, 0.72 and 0.33 respectively. Feature 1 has the highest importance score and is correlated with feature 2 and feature 3. Feature 2 and feature 3 can represent the data from different perspectives, so feature 2 and feature 3 are not correlated with each other. When the mRMR method selects the above four features, since feature 2 and feature 3 are both correlated with feature 1, feature 1 and feature 4 will eventually be selected and feature 2 and feature 3 will be ignored. In fact, the combination of feature 2 and feature 3 has stronger discriminative ability than feature 1 and feature 4. Therefore, the mRMR method cannot minimize the redundancy of global features, nor can it select features with strong discriminativeness (such as feature 2 and feature 3).
[0060] See also Figure 3 , which shows a main flow chart of a feature selection method provided by an embodiment of the present invention, comprising the following steps:
[0061] S301: Determine features in each sample, and construct a sample vector based on the values of all features in each sample; wherein the sample is at least one of image, text, and voice data;
[0062] S302: Processing the sample vector using a sparse feature selection algorithm with global redundancy minimization to obtain an importance score vector; wherein the importance score vector includes the importance score of each feature;
[0063] S303: Extracting a predetermined number of features with the largest importance scores from the importance scores of the features as selected target features.
[0064] In the above implementation, for steps S301 to S303, since there are fewer features in low-dimensional data, this solution is only for feature selection of high-dimensional data (such as speech / image / text). High-dimensionality usually refers to the situation where the number of features is much larger than the number of samples.
[0065] Redundancy means that two or more features provide repeated information, so the redundancy information can be minimized: if feature i and feature j are related to each other, it is best to keep one of them and discard the other during feature selection, so as to achieve the purpose of minimizing the redundant information of the final selected feature.
[0066] Generally speaking, by reducing redundant features and using more informative features, better performance can be achieved in subsequent tasks (such as clustering and classification). For example, in the face recognition task, in order to distinguish a specific person, it is desirable to select some discriminative and representative non-redundant features, such as eyes, nose, and mouth, rather than non-representative redundant features such as hair. The motivation of the feature selection method for global redundancy minimization proposed in this scheme is to select representative and non-redundant features from the feature set of the sample.
[0067] Given n samples {x1,x2,...,x n}, using the sample matrix Represents a sample vector, where the kth row represents the kth sample d is the number of features. Taking a face picture as an example, its features can be wavelet features, histogram features, grayscale features, etc. extracted from this face photo.
[0068] The sparse feature selection algorithm (GRMS, Global RedundancyMinimize feature Selection) provided by this solution is:
[0069]
[0070]
[0071] Calculate w and s. This solution mainly uses s to select features. Among them, is the regression coefficient matrix, corresponding to the first importance scoring vector without considering feature redundancy, and is also the feature importance weight produced by the sparse feature selection algorithm; s is the second importance scoring vector considering redundancy; represents a vector of size d that is all 1, and γ, β, and λ are regularization parameters used to balance the weights of each term in the formula. It is worth noting that in order to prevent the optimization formula from falling into a trivial solution, the elements in s are introduced and 1 constrained, s T 1=1 (the element is not 0 and the sum is 1).
[0072] The first item in GRMS regresses the training sample to the label (corresponding to y, the category to which the sample belongs) through the regression coefficient, and measures the regression value and the true value through the square loss function; the second item is the norm of the regression coefficient w, which can produce a sparse effect, that is, many rows of elements in the final solution w are 0, and non-zero rows correspond to the retained features, thereby realizing the feature selection function. The last two items characterize the global feature redundancy information in feature selection and minimize it.
[0073] In the above formula, A is a redundant matrix. Characterize the redundancy of two features. Given a sample vector The data matrices composed of the i-th feature and the j-th feature are X (i) , X (j) (i,j=1,2,...,d). Accordingly, the following centralized features can be obtained:
[0074]
[0075] in, is the centralization matrix, and It represents the eigenvector of the ith feature and the jth feature after centering. In actual operation, the centering matrix can be ignored and the values of a feature in different samples can be directly normalized.
[0076] The redundancy matrix A can be calculated as follows:
[0077]
[0078] It can be seen that the redundant matrix in is the Hadamard product, so the above formula can be written in the following matrix form: B = DF T FD=(FD) T FD, where F = [f1,f2,...,f d ], D is a diagonal matrix whose diagonal elements are 1 / ||f i ||, i = 1, 2, ..., d. At the same time, it can be determined that the matrix B is a semi-positive definite matrix.
[0079] Assume that the i-th feature and the j-th feature are highly correlated, and whether they are positively correlated or negatively correlated, the absolute value of the correlation coefficient is relatively large. In order to penalize high correlation, the square cosine similarity is used to measure the correlation between two features. Since B is a semi-positive definite matrix, it is obvious that the redundant matrix A is non-negative and also semi-positive definite.
[0080] The sparse feature selection algorithm can minimize the global feature redundancy while ensuring the consistency of the weights of the features before and after correction. Specifically, if feature i is correlated with all other features, the first term of the sparse feature selection algorithm will result in a modified weight score s for feature i. i becomes smaller, thereby reducing the importance of feature i. On the other hand, if feature i is irrelevant to all other features, the modified weight score s of feature i i Combined with the initial feature weight score w i Remain consistent, that is, the weight score of feature i remains unchanged.
[0081] Taking face recognition application as an example, suppose that the features extracted from the original face data include grayscale features, histogram features, Fourier features, gradient features, etc. The matrix X is composed of the above features of different pictures, and y is the category vector corresponding to different people. The redundant matrix A is calculated according to the data matrix X, and then the matrix X, the category vector y and the redundant matrix A are input into the GRMS formula to finally obtain the modified weight score vector s of the 4 different features. The larger the value of the element in s, the higher the feature weight corresponding to it.
[0082] See also Figure 4 The redundancy matrix shown in the figure shows that the darker the color, the stronger the correlation (i.e., redundancy) between the features. It is worth noting that feature selection and feature redundancy minimization are optimized and solved simultaneously.
[0083] This solution can also be considered from another perspective, such as firstly, on the basis of the sample vector, by using evaluation criteria such as extreme tree algorithm and random forest, the first importance score of each feature in the feature set is calculated without considering redundancy, and the first importance score vector is constructed. Then the first importance score vector is input into the redundant information minimization criterion to perform redundancy correction on different features to obtain the second importance vector s, where the second importance vector includes the second importance score of each feature. The redundant information minimization criterion is:
[0084]
[0085]
[0086] Among them, λ is the regularization parameter, which is used to balance the weights of the first and second terms. The redundancy matrix describes the correlation between the features, that is, the redundancy.
[0087] Specifically, the first term s T As describes the redundancy of global features, so the first term should be as small as possible; the second term w T s describes the consistency between the original feature first importance score w (without considering redundancy) and the modified feature second importance score s (considering redundancy). Since it is expected that the modified feature can be as consistent as possible with the importance of the feature before correction, the second item should be as large as possible.
[0088] The method provided in the above embodiment proposes a sparse feature selection algorithm GRMS for global redundancy minimization, which sorts the feature importance after calculating the second importance score vector, and at the same time describes which non-redundant features are based on the redundancy matrix to correct the sparsely selected features.
[0089] The method provided in this solution proposes a sparse feature selection algorithm by global redundancy minimization to address the problem that existing methods are unable to select feature subsets with minimized global redundant information. The algorithm corrects the redundancy of features based on the redundant matrix, and feature selection and feature redundancy minimization are optimized and solved simultaneously.
[0090] See also Figure 5 , which shows a schematic diagram of main modules of a feature selection device 500 provided in an embodiment of the present invention, including:
[0091] A feature determination module 501 is used to determine the features in each sample and construct a sample vector based on the values of all features in each sample; wherein the sample is at least one of image, text, and voice data;
[0092] A vector processing module 502 is used to process the sample vector using a sparse feature selection algorithm with global redundancy minimization to obtain an importance score vector; wherein the importance score vector includes the importance score of each feature;
[0093] The feature selection module 503 is used to extract a predetermined number of features with the largest importance scores from the importance scores of the features as selected target features.
[0094] In the implementation device of the present invention, the vector processing module 502 is used to:
[0095] Determine the category to which each sample belongs, and input the sample vector, the category, the first importance score vector, the second importance score vector and the redundancy matrix into a sparse feature selection algorithm for global redundancy minimization for minimization; wherein the first importance score vector does not consider redundancy, and the second importance score vector considers redundancy; and
[0096] Constraining the elements in the second importance score vector; wherein the constraint condition is that the elements are non-zero and the sum is 6;
[0097] Get the second importance score vector after minimizing and constraining the elements.
[0098] In the implementation device of the present invention, the vector processing module 502 is used to:
[0099] Processing the sample vector by using an evaluation criterion to calculate a first importance score of each feature without considering redundancy, thereby generating a first importance score vector;
[0100] A redundancy matrix is introduced, and the first importance score vector is input into a redundant information minimization criterion to perform redundancy correction on different features to obtain a second importance vector.
[0101] The implementation device of the present invention also includes a redundant matrix building module, which is used to:
[0102] Normalizing the values of a feature in different samples to construct a feature vector of the feature;
[0103] The inner product between the eigenvectors of two features is calculated to construct a redundancy matrix between the two features.
[0104] In the implementation device of the present invention, the redundant matrix construction module is used to:
[0105] Construct a data matrix based on the value of a feature in different samples;
[0106] The data matrix is processed using a centering matrix to obtain a centralized feature vector corresponding to the feature.
[0107] In addition, the specific implementation content of the device described in the embodiment of the present invention has been described in detail in the method described above, so the repeated content will not be described again here.
[0108] Figure 6 An exemplary system architecture 600 is shown in which embodiments of the present invention may be applied.
[0109] like Figure 6 As shown, the system architecture 600 may include terminal devices 601, 602, 603, a network 604 and a server 605 (just an example). The network 604 is used to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0110] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 601, 602, 603.
[0111] The terminal devices 601, 602, 603 may be various electronic devices having display screens and supporting web browsing, and the server 605 may be a server providing various services.
[0112] It should be noted that the method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the device is generally set in the server 605 .
[0113] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0114] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0115] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0116] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0117] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0118] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0119] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0120] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be arranged in a processor, for example, they may be described as: a processor including a feature determination module, a vector processing module, and a feature selection module. The names of these modules do not, in some cases, constitute limitations on the modules themselves, for example, the vector processing module may also be described as a "module for processing sample vectors to obtain importance score vectors".
[0121] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0122] Determine the features in each sample, and construct a sample vector based on the values of all the features in each sample; wherein the sample is at least one of image, text, and speech data;
[0123] Processing the sample vector using a sparse feature selection algorithm with global redundancy minimization to obtain an importance score vector; wherein the importance score vector includes the importance score of each feature;
[0124] From the importance scores of the features, a predetermined number of features with the largest importance scores are extracted as the selected target features.
[0125] According to the technical solution of the embodiment of the present invention, a sparse feature selection algorithm is proposed by minimizing global redundancy to correct the redundancy of features based on a redundant matrix, and feature selection and feature redundancy minimization are optimized and solved simultaneously.
[0126] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A feature selection method, characterized in that: include: Determine the features in each sample, and construct a sample vector based on the values of all the features in each sample; wherein the sample is at least one of image, text, and speech data; The sample vector is processed by a sparse feature selection algorithm with global redundancy minimization to obtain an importance score vector; wherein the importance score vector includes the importance score of each feature; the sample vector is processed by the sparse feature selection algorithm with global redundancy minimization, including: determining the category to which each sample belongs, inputting the sample vector, the category, the first importance score vector, the second importance score vector and the redundancy matrix into the sparse feature selection algorithm with global redundancy minimization for minimization; the first importance score vector does not consider redundancy, and the second importance score vector considers redundancy; and constraining the elements in the second importance score vector; wherein the constraint condition is that the element is non-0 and the sum is 1; obtaining the second importance score vector after minimization and constraining the elements; From the importance scores of the features, a predetermined number of features with the largest importance scores are extracted as the selected target features.
2. The method according to claim 1, characterized in that The sparse feature selection algorithm using global redundancy minimization is used to process the sample vector to obtain an importance score vector, including: Processing the sample vector by using an evaluation criterion to calculate a first importance score of each feature without considering redundancy, thereby generating a first importance score vector; A redundancy matrix is introduced, and the first importance score vector is input into a redundant information minimization criterion to perform redundancy correction on different features to obtain a second importance vector.
3. The method according to claim 1 or 2, characterized in that: Also includes: Normalizing the values of a feature in different samples to construct a feature vector of the feature; The inner product between the eigenvectors of two features is calculated to construct a redundancy matrix between the two features.
4. The method according to claim 3, characterized in that The step of normalizing the values of a feature in different samples to construct a feature vector of the feature includes: Construct a data matrix based on the value of a feature in different samples; The data matrix is processed using a centering matrix to obtain a centralized feature vector corresponding to the feature.
5. A feature selection device, characterized in that: include: A feature determination module, used to determine the features in each sample, and construct a sample vector based on the values of all features in each sample; wherein the sample is at least one of image, text, and voice data; A vector processing module, used for processing the sample vector using a sparse feature selection algorithm with global redundancy minimization to obtain an importance score vector; wherein the importance score vector includes the importance score of each feature; the sparse feature selection algorithm with global redundancy minimization is used to process the sample vector, including: determining the category to which each sample belongs, inputting the sample vector, the category, the first importance score vector, the second importance score vector and the redundancy matrix into the sparse feature selection algorithm with global redundancy minimization for minimization; the first importance score vector does not consider redundancy, and the second importance score vector considers redundancy; and constraining the elements in the second importance score vector; wherein the constraint condition is that the element is non-0 and the sum is 1; obtaining the second importance score vector after minimization and constraining the elements; The feature selection module is used to extract a predetermined number of features with the largest importance scores from the importance scores of the features as selected target features.
6. The device according to claim 5, characterized in that Also included are redundant matrix building blocks for: Normalizing the values of a feature in different samples to construct a feature vector of the feature; The inner product between the eigenvectors of two features is calculated to construct a redundancy matrix between the two features.
7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.