A sample and feature selection method and device based on hybrid sparsity
By using a hybrid sparse embedding learning method, discriminative features and samples are selected, which solves the problems of sample noise and class imbalance in medical image data and improves the generalization ability of the model.
Patent Information
- Application Number
- CN202211324277.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-10-27
AI Technical Summary
Existing technologies have failed to effectively address sample noise and class imbalance issues in medical imaging data, resulting in poor model generalization ability.
A hybrid sparse embedding learning method is adopted, which extracts features through deep learning and traditional machine learning, uses the l0 norm to select an appropriate number of positive and negative samples, and combines the l2 and p norms to perform adaptive sparse control of feature weights, mapping to a low-dimensional manifold space, optimizing the feature weight matrix and sample selection vector, and selecting discriminative features and samples.
It alleviates the class imbalance problem, removes noisy samples, and improves the generalization ability of classification and prediction models for medical imaging data.
Smart Images

Figure CN115601342B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medical image data mining, and in particular to a sample and feature selection method and device based on hybrid sparsity. BACKGROUND
[0002] With the rapid development of artificial intelligence (AI) technology, AI-based medical image analysis methods play an increasingly important role in intelligent diagnosis of diseases. Sparse learning, as one of the representative technologies of AI, can not only learn the inherent structural information of data, but also perform sample selection and feature selection to alleviate the problems of noise, class imbalance and high feature dimension in medical image data, and therefore has been widely applied in intelligent diagnosis of diseases based on medical image data.
[0003] At present, most researches mainly focus on feature selection to alleviate the overfitting problem caused by too high dimension of medical image data. However, these feature selection methods do not consider the negative impact of sample noise on classification and score prediction tasks. Therefore, some researches attempt to use sample and feature screening methods to solve the above problems. However, these methods only consider joint sparsity of samples and features, and do not consider the problem of class imbalance, thus resulting in poor generalization ability of the model. SUMMARY
[0004] The present application provides a sample and feature selection method and device based on hybrid sparsity, to solve or at least partially solve the technical problem of poor feature and sample selection effect in the prior art, resulting in poor generalization ability of the model.
[0005] To solve the above technical problems, the first aspect of the present application provides a sample and feature selection method based on hybrid sparsity, comprising:
[0006] S1: Extract the features of each medical image by deep learning, traditional machine learning and medical toolkit, and the extracted medical image features form a sample feature matrix Wherein, n represents the number of feature samples, and d represents the feature dimension;
[0007] S2: Map the original high-dimensional feature data in the sample feature matrix to a low-dimensional manifold space by using a hybrid sparse embedding learning method, wherein the objective function is:
[0008]
[0009] s.t.s i 1=1,0≤s ij ≤1,W T W=,γ=sum(S,2)
[0010] γ i ∈{0,1},||γ Z(+1) ||0=k1,||γ Z(-10 ||0=k2 (5-1)
[0011] In the above formula, x i and x j respectively represent the i-th and j-th sample in the sample feature matrix X, represents the feature weight coefficient matrix with the projection dimension m, represents the sample similarity matrix, s ij represents the similarity value between the i-th sample and the j-th sample, μ is a regularization parameter, represents that the l 2,p norm is used for adaptive sparse control of the feature weight while mapping the original high-dimensional feature data to the low-dimensional manifold space, λ1 is a hyperparameter; in the constraint term, s i is the i-th row similarity vector of S, s i 1=1 is used to ensure that the sum of the similarity of each sample with other samples is equal to 1, where 1 is a column vector composed of n 1s, 0≤s ij ≤1 ensures that the similarity between two samples is within the interval of 0 and 1; S T W=E is used to ensure that the obtained column vector solution is a unit orthogonal vector, sum(S,2) represents the sum of the sample similarity matrix S in the row direction, γ i is the element corresponding to the i-th sample in the sample selection vector, if the i-th sample x i is selected, then γ i is equal to 1, otherwise γ i is 0; ||γ Z(+1) ||0=k1 and ||γ Z(-1) ||0=k2 represent that the l0 norm is used to constrain γ, so as to select a specified number of positive and negative samples, k1 and k2 respectively represent the number of positive samples and the number of negative samples, Z(+1)={i:y i =+1} and Z(-1)={i:y i =-1} respectively represent the positive and negative sample index sets;
[0012] S3: optimizing the objective function to obtain the optimal feature weight matrix W' and the optimal sample selection vector γ',
[0013] S4: selecting the corresponding features according to the optimal feature weight matrix W', and selecting the corresponding samples according to the value of the optimal sample selection vector γ';
[0014] S5: training the classification model or the prediction model by using the selected samples and the feature data, obtaining a trained classification model or a trained prediction model, and inputting the medical image data to be classified or to be predicted into the trained classification model or the trained prediction model according to the obtained optimal feature weight matrix to obtain a classification result or a prediction result.
[0015] In an embodiment, S3 comprises:
[0016] S3.1: fixing the sample similarity matrix S, and then updating W, and formula (5-1) is converted into:
[0017]
[0018] s.t.W T W=E (5-2)
[0019] wherein L s is equal to The degree matrix D is a diagonal matrix, and the i-th element on the diagonal line is equal to
[0020] S3.2: fixing W, and then updating S, and formula (5-1) is converted into:
[0021]
[0022] s.t.s i 1=1, 0≤sij≤1, γ=sum(S,2)
[0023] γ i ∈{0,1}, ||γ Z(+1) ||0=k1, ||γ Z(-1) ||0=k2 (5-3)
[0024] Since the similarity vector of each sample is independent, each sample is solved respectively:
[0025]
[0026] s.t.s i 1=1, 0≤s ij ≤1 (5-4)
[0027] wherein and Rewriting formula (5-4) obtains:
[0028]
[0029] s.t.s i 1=1, 0≤s ij≤1 (5-5)
[0030] Solving the similarity matrix S, the c nearest samples with the same label as sample i are calculated for the similarity value, and the rest is zero, to obtain the similarity matrix S without sample selection;
[0031] S3.3: Sum the elements of the matrix A=[a ij ] by row after setting the elements of different categories to zero, and get the column vector Where b i represents the Euclidean distance of the i-th sample and other samples of the same class in the low-dimensional flow space, and the positive sample element value in b is sorted from small to large, The negative sample element value in b is sorted from small to large according to the first k1 positive sample index after sorting, The first k2 negative samples after sorting, get the similarity matrix S after the current sample selection
[0032]
[0033]
[0034] S3.4: Determine whether the row vector of the updated similarity matrix Element is not all zero, if yes, set γ i =1, otherwise, set γ i =0,
[0035] S3.5: Iteratively execute steps S3.1-S3.4 until formula (5-1) converges or the maximum number of iterations is met, and finally obtain the optimal feature weight matrix W′ and the optimal sample selection vector γ′.
[0036] In one embodiment, step S4 includes:
[0037] For feature selection, calculate the square sum of each row of the optimal feature weight matrix W′ to get the vector v, then calculate the average value of all elements in v to get the average value h, and select the features corresponding to all elements in v i ≥(0.2×h).
[0038] For sample selection, select the samples corresponding to the elements with value 1 in the γ′ vector.
[0039] Based on the same inventive concept, the second aspect of the present application provides a hybrid sparse-based sample and feature selection device, comprising:
[0040] A feature extraction module is configured to extract features of each medical image by deep learning, traditional machine learning, and medical tool package. The extracted medical image features form a sample feature matrix wherein n represents the number of characteristic samples, and d represents the characteristic dimension;
[0041] The embedding learning module is configured to map original high-dimensional characteristic data in the sample characteristic matrix to a low-dimensional manifold space by using a hybrid sparse embedding learning method, wherein a target function is:
[0042]
[0043] s.t.s i 1=1, 0≤s ij ≤1, W T W=E, γ=sum(S,2)
[0044] γ i ∈{0,1}, ||γ Z(+1) ||0=k1, ||γ Z(-1) ||0=k2 (5-1)
[0045] In the above formula, x i and x j respectively represent an i-th and a j-th sample in the sample characteristic matrix X, represents a characteristic weight coefficient matrix with a projection dimension of m, represents a sample similarity matrix, s ij represents a similarity value between an i-th sample and a j-th sample, and μ is a regularization parameter for avoiding meaningless solutions, represents that the original high-dimensional characteristic data is mapped to the low-dimensional manifold space while the l 2,p norm is used for adaptive sparse control of the characteristic weight, and λ1 is a hyperparameter; in the constraint term, s i is an i-th row similarity vector of S, s i 1=1 is used to ensure that the sum of the similarities between each sample and other samples is equal to 1, wherein 1 is a column vector composed of n 1s, 0≤s ij ≤1 ensures that the similarity between two samples is within the interval of 0 and 1; W T S=E is used to ensure that the obtained column vector solution is a unit orthogonal vector, sum(S,2) represents summing S in the row direction, γ i is an element corresponding to the i-th sample in the sample selection vector, if the i-th sample x i is selected, then γ i is equal to 1, otherwise γ i is 0; ||γ Z(+1) ||0=k1 and ||γ Z(-1)||0=k2 indicates that the l0 norm is used to constrain γ, thereby selecting a specified number of positive and negative samples, k1 and k2 respectively represent the number of positive samples and the number of negative samples, Z(+1)={i:y i =+1} and Z(-1)={i:y i =-1} respectively represent the positive and negative sample index sets;
[0046] An optimization module is configured to optimize the objective function to obtain an optimal feature weight matrix W' and an optimal sample selection vector γ';
[0047] A sample and feature selection module is configured to select corresponding features according to the optimal feature weight matrix W' and select corresponding samples according to the value of the optimal sample selection vector γ';
[0048] A classification or prediction module is configured to train a classification model or a prediction model by using the selected sample and feature data, to obtain a trained classification model or a prediction model, and to select features from the optimal feature weight matrix W' for medical image data to be classified or predicted, and then input the selected features into the trained classification model or prediction model to obtain a classification result or a prediction result.
[0049] Based on the same inventive concept, the third aspect of the present application provides a computer readable storage medium having a computer program stored thereon, the program being executed to implement the method of the first aspect.
[0050] Based on the same inventive concept, the fourth aspect of the present application provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the method of the first aspect.
[0051] Compared with the prior art, the present application has the following advantages and beneficial technical effects:
[0052] The sample and feature selection method of the hybrid sparse embedding learning provided by the present application, after extracting the features of the medical image, forms a sample feature matrix as the original data, and then uses a hybrid sparse embedding learning method to map the original high-dimensional feature data in the sample feature matrix to a low-dimensional manifold space, the objective function used in the learning method selects appropriate numbers of positive and negative samples by using embedding learning and l0 norm, thereby alleviating the class imbalance problem (see formula 5-1), the present application uses l 2,pThe adaptive sparse is performed by using the l0 norm to select discriminative features (see formula 5-1), then the objective function is optimized to obtain the optimal feature weight matrix W' and the optimal sample selection vector γ', and the corresponding features are selected according to the optimal feature weight matrix, and the corresponding samples are selected according to the value of the optimal sample selection vector γ'; finally, the selected samples and features are used for automatic classification and prediction of medical image data, which can not only perform feature sparse, but also remove noise samples and relieve the class imbalance problem, and improve the generalization ability of the classification model or the prediction model. BRIEF DESCRIPTION OF DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings described below are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0054] Figure 1 It is the overall flowchart of the sample and feature selection method based on hybrid sparse provided by the embodiment of the present application;
[0055] Figure 2 It is the structural block diagram of the sample and feature selection device based on hybrid sparse provided by the embodiment of the present application;
[0056] Figure 3 It is the structural schematic diagram of the computer readable storage medium provided by the embodiment of the present application;
[0057] Figure 4 It is the structural schematic diagram of the computer device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0058] In view of the problems that medical image data contains noise, contains redundant features, and exists class imbalance, the present application provides a sample and feature selection method based on hybrid sparse to select information-rich samples and features. Specifically, the present application uses embedding learning and l0 norm to select appropriate number of positive and negative samples to relieve the class imbalance problem. The present application uses l 2,p The adaptive sparse is performed by using the l0 norm to select discriminative features (see formula 5-1), then the objective function is optimized to obtain the optimal feature weight matrix W' and the optimal sample selection vector γ', and the corresponding features are selected according to the optimal feature weight matrix, and the corresponding samples are selected according to the value of the optimal sample selection vector γ'; finally, the selected samples and features are used for automatic classification and prediction of medical image data, which can not only perform feature sparse, but also remove noise samples and relieve the class imbalance problem, and improve the generalization ability of the classification model or the prediction model.
[0059] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0060] Embodiment one
[0061] The embodiments of the present application provide a sample and feature selection method based on hybrid sparsity, comprising:
[0062] S1: features of each medical image are extracted through deep learning, traditional machine learning and a medical toolkit, and the extracted medical image features constitute a sample feature matrix Wherein, n represents the number of feature samples, and d represents the feature dimension;
[0063] S2: a hybrid sparse embedding learning method is used to map original high-dimensional feature data in the sample feature matrix to a low-dimensional manifold space, wherein the objective function is:
[0064]
[0065] s.t.s i 1=1,0≤s ij ≤1,W T W=E,γ=sum(S,2)
[0066] γ i ∈{0,1},||γ Z(+1) ||0=k1,||γ Z(-1) ||0=k2 (5-1)
[0067] In the above formula, x i and x j respectively represent the i-th and j-th sample in the sample feature matrix X, represents a feature weight coefficient matrix with a projection dimension of m, represents a sample similarity matrix, s ij represents the similarity value of the i-th sample and the j-th sample, and μ is a regularization parameter for avoiding meaningless solutions, represents that the original high-dimensional feature data is mapped to the low-dimensional manifold space while the l 2,p norm is used for adaptive sparse control of feature weights, and λ1 is a hyperparameter; in the constraint term, s i is the i-th row similarity vector of S, and s i1 = 1 to ensure that the sum of the similarity of each sample to other samples equals 1, where 1 is a column vector consisting of n 1s, 0 < s ij ≤ 1 to ensure that the similarity between two samples is in the interval [0, 1]; T W = E to ensure that the resulting column vector solution is a unit orthogonal vector, sum (S, 2) represents the sum of the sample similarity matrix S in the row direction, γ i is the element corresponding to the ith sample in the sample selection vector, if the ith sample x i is selected, then γ i equals 1, otherwise γ i is 0; || γ Z(+1) || 0 = k1 and || γ Z(-1) || 0 = k2 indicates that the l0 norm is used to constrain γ, thereby selecting a specified number of positive and negative samples, k1 and k2 represent the number of positive samples and the number of negative samples respectively, Z (+1) = {i: y i = +1} and Z (-1) = {i: y i = -1} represent the positive and negative sample index sets respectively;
[0068] S3: optimizing the objective function to obtain the optimal feature weight matrix W' and the optimal sample selection vector γ',
[0069] S4: selecting the corresponding features according to the optimal feature weight matrix W' and selecting the corresponding samples according to the value of the optimal sample selection vector γ';
[0070] S5: training the classification model or the prediction model using the selected sample and feature data to obtain the trained classification model or the prediction model, and the medical image data to be classified or to be predicted selects the features according to the obtained optimal feature weight matrix, and then inputs into the trained classification model or the prediction model to obtain the classification result or the prediction result.
[0071] Please refer to Figure 1 , which is the overall flowchart of the sample and feature selection method based on mixed sparsity provided by the embodiment of the application.
[0072] It should be noted that, regarding characters, the application conventionally uses capital bold letters G to represent matrices, lower-case bold letters g to represent vectors, and lower-case italic letters g to represent scalars, g i and g j represent the ith row and the jth column of G respectively. The sample in the application refers to a feature sample, and a feature sample is composed of 1xd features.
[0073] Specifically, the medical image features extracted from S1 include: fully connected layer features of convolutional neural networks, HOG and SIFT column vector features extracted by traditional machine learning, and neuroimaging column vector features extracted by the VBM toolkit. These features constitute the sample feature matrix X.
[0074] In the objective function, s ij Represents the similarity value between the i-th sample and the j-th sample. The larger the value, the more similar the two samples are. This term maps the original data X to a low-dimensional manifold space using the norm l 2,p Perform adaptive sparse control of feature weights, so that the value of p can be adaptively determined and features can be selected according to different classification scenarios. Z(+1) ||0=k1 and ||γ Z(-1) ||0=k2 means using the l0 norm to constrain γ, selecting a specified number of k1 positive samples and a specified number of k2 samples to alleviate the problem of class imbalance.
[0075] A feature sample is composed of 1×d features. The original feature dimension is high and redundant, so feature selection is needed to screen out discriminative features (informative features). This process is a process of dimensionality reduction and redundancy removal. After feature selection, the dimension of a sample will be reduced. For example, after feature selection, the dimension of the feature sample changes from the original 1×d to 1×l, where l is a value less than d.
[0076] Regarding sample selection, it is based on the value of the element of the optimal sample selection vector γ′. If the value is not 1, it indicates that the quality of a certain sample is poor (noisy), and it will not be selected. Then the features contained in the feature sample are all bad. For example, a feature sample is 1×d. If this sample is noisy, the entire feature sample will not be selected.
[0077] In general, in addition to being able to perform feature selection like most manifold learning methods, the present invention introduces sample selection and category balance mechanisms into manifold learning for the first time (in existing logistic regression and linear regression problems, only the fitting value of a single sample is considered when addressing the sample balance problem, and the relationship between samples is ignored). It also considers the relationship between samples (using the Euclidean distance between samples to represent the similarity between samples). Therefore, the present invention can simultaneously solve the problems of feature redundancy, sample noise, and category imbalance.
[0078] In one embodiment, S3 includes:
[0079] S3.1: Fix the sample similarity matrix S, then update W, and formula (5-1) is converted to:
[0080]
[0081] s.t.W T W=E (5-2)
[0082] where Ls is equal to The degree matrix D is a diagonal matrix, and the i-th element on its diagonal is equal to
[0083] S3.2: Fix W, then update S, formula (5-1) is converted to:
[0084]
[0085] s.t.s i 1=1, 0≤s ij ≤1, γ=sum(S,2)
[0086] γ i ∈{0,1}, ||γ Z(+1) ||0=k1, ||γ Z(-1) ||0=k2 (5-3)
[0087] Since the similarity vector of each sample is independent, solve each sample respectively:
[0088]
[0089] s.t.s i 1=1, 0≤s ij ≤1 (5-4)
[0090] where S is used and Rewrite formula (5-4) to get:
[0091]
[0092] s.t.s i 1=1, 0≤s ij ≤1 (5-5)
[0093] Solve the similarity matrix S, calculate the similarity value of the c nearest samples with the same label as sample i, and set the rest to zero, to get the similarity matrix S without sample selection;
[0094] S3.3: After setting the element values of different categories of samples in matrix A=[a ij ] to zero, sum by row to get column vector where b i represents the Euclidean distance sum of the i-th sample and other samples of the same class in the low-dimensional flow space, and the positive sample element value in b is sorted from small to large, Sort the element values of the negative samples in b in ascending order corresponding to the top k1 positive sample indices after sorting, Corresponding to the top k2 negative samples after sorting, the similarity matrix after the current sample selection is obtained
[0095]
[0096]
[0097] S3.4: Determine whether the row vector of the updated similarity matrix is all zero If yes, set gamma i If not, set gamma i To 0,
[0098] S3.5: Iteratively execute steps S3.1-S3.4 until formula (5-1) converges or the maximum number of iterations is met, and finally obtain the optimal feature weight matrix W' and the optimal sample selection vector gamma'.
[0099] Specifically, the solving process of the similarity matrix S can refer to the literature, and the solving process can refer to the literature Huang Z., Lei H., Chen G., et al. Parkinson's Disease Classification and Clinical Score Regression via United Embedding and Sparse Learning From Longitudinal Data [J]. IEEE Transactions on Neural Networks and Learning Systems, 2022, 33(8): 3357-3371.
[0100] The difference between the solving process and the document is that the application calculates the similarity value of the c nearest samples with the same label as sample i, and the rest is zero. The reference is to calculate the nearest c sample similarity value for each sample, while the application is to calculate the nearest c similarity value for a sample and the sample with the same category as the sample. The objects of similarity calculation are different, so the meanings of the similarity matrix are different. If a sample is excluded from the similarity matrix of the application, the similarity between the sample and other samples is 0. In addition, the reference does not perform sample selection, that is, there is no step S3.5. The reference only performs feature selection to solve the overfitting problem caused by high feature dimension, and does not perform sample selection. The application simultaneously performs sample and feature selection, which can not only solve the overfitting problem caused by high feature dimension, but also remove noisy samples through sample selection to alleviate the class imbalance problem.
[0101] In an embodiment, step S4 comprises:
[0102] For feature selection, the square root of the sum of squares of each row in the optimal feature weight matrix W' is calculated to obtain a vector v, and then the average value of all elements in v is calculated to obtain a mean value h. The features corresponding to the elements in v i ≥(0.2×h) are selected.
[0103] For sample selection, the samples corresponding to the elements with a value of 1 in the gamma' vector are selected.
[0104] In general, the existing sparse learning method based on popular embedding can only perform feature sparsity, which can only solve the problem of feature redundancy. Since many medical image data currently exist not only the problem of feature redundancy, but also the problems of sample noise and class imbalance of positive and negative samples, which is not conducive to the automatic classification or prediction of diseases. Based on the above consideration, the application provides a sample and feature selection method of hybrid sparse embedding learning, which can not only perform feature sparsity, but also remove noisy samples and alleviate the class imbalance problem, so as to select samples rich in information and features with discriminative power, improve the selection effect of samples and features, and then train the selected samples and features on the classification model or prediction model to obtain a target model with strong generalization ability.
[0105] Embodiment two
[0106] Based on the same inventive concept, the embodiment provides a sample and feature selection device based on hybrid sparsity, please see Figure 2 The device comprises:
[0107] The feature extraction module 201 is configured to extract features of each medical image by deep learning, traditional machine learning or a medical toolkit. The extracted medical image features form a sample feature matrix wherein n represents the number of characteristic samples, and d represents the characteristic dimension;
[0108] The embedding learning module 202 is configured to map original high-dimensional characteristic data in the sample characteristic matrix to a low-dimensional manifold space by using a hybrid sparse embedding learning method, wherein the objective function is:
[0109]
[0110] s.t.s i 1=1, 0≤s ij ≤1, W T W=E, γ=sum(S,2)
[0111] γ i ∈{0,1}, ||γ Z(+1) ||0=k1, ||γ Z(-1) ||0=k2 (5-1)
[0112] In the above formula, x i and xj represent the i-th and j-th samples in the sample characteristic matrix X respectively, represents a characteristic weight coefficient matrix with a projection dimension of m, represents a sample similarity matrix, s ij represents the similarity value between the i-th sample and the j-th sample, and μ is a regularization parameter for avoiding meaningless solutions, represents that the original high-dimensional characteristic data is mapped to the low-dimensional manifold space while the l 2,p norm is used for adaptive sparse control of the characteristic weight, and λ1 is a hyperparameter; in the constraint term, s i is the i-th row similarity vector of S, s i 1=1 is used to ensure that the sum of the similarity of each sample to other samples is equal to 1, wherein 1 is a column vector composed of n 1s, 0≤s ij ≤1 ensures that the similarity between two samples is within the interval of 0 and 1; W T W=E is used to ensure that the obtained column vector solution is a unit orthogonal vector, sum(S,2) represents the sum of the sample similarity matrix S in the row direction, γ i is the element corresponding to the i-th sample in the sample selection vector, if the i-th sample x i is selected, then γ i is equal to 1, otherwise γ i is 0; ||γ Z(+1) ||0=k1 and ||γ Z(-1) ||0=k2 represent that the l0 norm is used to constrain γ, so as to select a specified number of positive and negative samples, k1 and k2 represent the number of positive samples and the number of negative samples respectively, Z(+1)={i: yi Z(-1) = {i: y i Z(-1) = {i: y
[0113] an optimization module 203, configured to optimize the target function to obtain an optimal feature weight matrix W' and an optimal sample selection vector γ';
[0114] a sample and feature selection module 204, configured to select corresponding features according to the optimal feature weight matrix W' and select corresponding samples according to the value of the optimal sample selection vector γ';
[0115] a classification or prediction module 205, configured to train a classification model or a prediction model by using the selected sample and feature data, to obtain a trained classification model or prediction model, and to select features from the optimal feature weight matrix W' for medical image data to be classified or predicted, and then input the selected features into the trained classification model or prediction model to obtain a classification result or a prediction result.
[0116] Since the device introduced in the second embodiment of the present application is a device used to implement the sample and feature selection method based on mixed sparsity in the first embodiment of the present application, the specific structure and variations of the device can be understood by those skilled in the art based on the method introduced in the first embodiment of the present application, and thus will not be described here again. Any device used in the method in the first embodiment of the present application belongs to the scope of the present application.
[0117] Embodiment Three
[0118] Based on the same inventive concept, please refer to Figure 3 The present application also provides a computer readable storage medium 300 having a computer program 311 stored thereon, which, when executed, implements the method described in the first embodiment.
[0119] Since the computer readable storage medium introduced in the third embodiment of the present application is a computer readable storage medium used to implement the sample and feature selection method based on mixed sparsity in the first embodiment of the present application, the specific structure and variations of the computer readable storage medium can be understood by those skilled in the art based on the method introduced in the first embodiment of the present application, and thus will not be described here again. Any computer readable storage medium used in the method in the first embodiment of the present application belongs to the scope of the present application.
[0120] Embodiment Four
[0121] Based on the same inventive concept, the present application also provides a computer device, as shown in Figure 4As shown, it comprises a memory 401, a processor 402 and a computer program 403 stored in the memory and capable of running on the processor, and the processor implements the method in Embodiment One when executing the above program.
[0122] Since the computer device introduced in Embodiment Four of the present application is the computer device used for implementing the sample and feature selection method based on mixed sparsity in Embodiment One of the present application, the specific structure and variations of the computer device can be understood by those skilled in the art based on the method introduced in Embodiment One of the present application, and thus will not be described here again. Any computer device used for the method in Embodiment One of the present application belongs to the scope of the present application.
[0123] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the computer or other programmable data processing device produce a device for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The function of one or more flows or one or more blocks Figure 1 The means for implementing the function of one or more flows or one or more blocks.
[0125] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to the embodiments once they know the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including all the preferred embodiments and all the changes and modifications falling within the scope of the present application.
[0126] Obviously, those skilled in the art can make various modifications and variations to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A hybrid sparse based sample and feature selection method, characterized in that, Comprising: S1: Extract the features of each medical image through deep learning, traditional machine learning and medical toolkit, and the extracted medical image features form a sample feature matrix wherein n represents the number of feature samples, and d represents the feature dimension. S2: using a hybrid sparse embedding learning method to map the original high-dimensional feature data in the sample feature matrix to a low-dimensional manifold space, wherein the objective function is: s.t.s i 1 = 1, 0 < s ij ≤ 1, W T W = E, γ = sum(S, 2) γ i ∈{0,1},||γ Z(+1) ||0=k1,||γ Z(-1) ||0=k2 (5-1) In the above formula, x i and x j respectively represent the i-th and j-th sample in the sample feature matrix X, represents the feature weight coefficient matrix with the projection dimension m, represents the sample similarity matrix, s ij represents the similarity value between the i-th sample and the j-th sample, μ is a regularization parameter, represents the adaptive sparse control of the feature weight while mapping the original high-dimensional feature data to the low-dimensional manifold space by simultaneously using the l 2,p norm, λ1 is a hyperparameter; in the constraint term, s i is the i-th row similarity vector of S, s i 1=1 is used to ensure that the sum of the similarity of each sample with other samples is equal to 1, where 1 is a column vector composed of n 1s, 0≤s ij ≤1 ensures that the similarity between two samples is within the interval of 0 and 1; W T W=E is used to ensure that the obtained column vector solution is a unit orthogonal vector, sum(S,2) represents the sum of the sample similarity matrix S in the row direction, γ i is the element corresponding to the i-th sample in the sample selection vector, if the i-th sample x i is selected, then γ i is equal to 1, otherwise γ i is 0; ||γ Z(+1) ||0=k1 and ||γ z(-1) ||0=k2 represent the use of the l norm to constrain γ, so as to select a specified number of positive and negative samples, k1 and k2 respectively represent the number of positive samples and the number of negative samples, Z(+1)={i:y i =+1} and Z(-1)={i:y i =-1} respectively represent the positive and negative sample index sets; S3: optimizing the objective function to obtain the optimal feature weight matrix W' and the optimal sample selection vector γ', S4: selecting the corresponding features according to the optimal feature weight matrix W', and selecting the corresponding samples according to the value of the optimal sample selection vector γ'; S5: training the classification model or the prediction model using the selected samples and feature data to obtain a trained classification model or a trained prediction model, and the medical image data to be classified or to be predicted selects the features according to the obtained optimal feature weight matrix, and then inputs into the trained classification model or the trained prediction model to obtain the classification result or the prediction result.
2. The hybrid sparsity based sample and feature selection method of claim 1, wherein S3 Comprising: S3.1: fixing the sample similarity matrix S, and then updating W, formula (5-1) is converted to: s.t.W T W = E (5-2) where L s is equal to The degree matrix D is a diagonal matrix whose i-th diagonal element has the value S3.2: fixing W, and then updating S, formula (5-1) is converted to: s.t.s i 1 = 1, 0 < s ij < 1, γ = sum(S, 2) γ i ∈{0,1},||γ Z(+1) ||0=k1,||γ Z(-1) ||0=k2 (5-3) Since the similarity vector of each sample is independent, solve each sample respectively: s.t.s i 1 = 1, 0 < s ij ≤ 1 (5-4) wherein use and Rewriting equation (5-4) gives: s.t.s i 1 = 1, 0 < s ij ≤ 1 (5-5) Solve the similarity matrix S, calculate the similarity value of the c nearest samples with the same label as sample i, and set the rest to zero to obtain the similarity matrix S without sample selection; S3.3: Sum the row of matrix A = [a ij ] after setting the element value of different categories of samples to zero, and get the column vector where b i represents the Euclidean distance of the ith sample and other samples of the same category in the low-dimensional flow space, and the positive sample element value in b is sorted from small to large, corresponding to the first k1 positive sample index after sorting, the negative sample element value in b is sorted from small to large, corresponding to the first k2 negative sample after sorting, get the similarity matrix after the current sample selection S3.4: judging the row vector of the updated similarity matrix whether the element is non-zero, and if so, set γ i to 1, otherwise set γ i to 0, S3.5: iteratively execute steps S3.1-S3.4 until formula (5-1) converges or the maximum number of iterations is met, and finally obtain the optimal feature weight matrix W' and the optimal sample selection vector γ'.
3. The hybrid sparsity based sample and feature selection method of claim 1, wherein, Step S4 comprises: For feature selection, the square root of the sum of each row in the optimal feature weight matrix W' is calculated to obtain a vector v, and then the average of all elements in v is calculated to obtain an average h. The features corresponding to all elements in v with values v i ≥ (0.2 x h) are selected. For sample selection, select the sample corresponding to the element value of 1 in the γ' vector.
4. A hybrid sparse based sample and feature selection apparatus, comprising: Comprising: The feature extraction module is configured to extract features of each medical image by deep learning, traditional machine learning or a medical toolkit, and the extracted medical image features form a sample feature matrix Wherein, n represents the number of feature samples, and d represents the feature dimension. An embedding learning module, which uses a hybrid sparse embedding learning method to map the original high-dimensional feature data in the sample feature matrix to a low-dimensional manifold space, wherein the objective function is: s.t.s i 1 = 1, 0 < s ij ≤ 1, W T W = E, γ = sum(S, 2) γ i ∈{0,1},||γ Z(+1) ||0=k1,||γ Z(-1) ||0=k2 (5-1) In the above formula, x i and x j respectively represent the i-th and j-th sample in the sample feature matrix X, represents the feature weight coefficient matrix with the projection dimension m, represents the sample similarity matrix, s ij represents the similarity value between the i-th sample and the j-th sample, μ is a regularization parameter for avoiding meaningless solutions, represents the adaptive sparse control of the feature weight while mapping the original high-dimensional feature data to the low-dimensional manifold space by simultaneously using the l 2,p norm, λ1 is a hyperparameter; in the constraint term, s i is the i-th row similarity vector of S, s i 1=1 is used to ensure that the sum of the similarities between each sample and other samples is equal to 1, where 1 is a column vector composed of n 1s, 0≤s ij ≤1 ensures that the similarity between two samples is within the interval of 0 and 1; W T W=E is used to ensure that the obtained column vector solution is a unit orthogonal vector, sum(S,2) represents the sum of the sample similarity matrix S in the row direction, γ i is the element corresponding to the i-th sample in the sample selection vector, if the i-th sample x i is selected, then γ i is equal to 1, otherwise γ i is 0; ||γ Z(+1) ||0=k1 and ||γ Z(-1) ||0=k2 represent the use of the l0 norm to constrain γ, thereby selecting a specified number of positive and negative samples, k1 and k2 respectively represent the number of positive samples and the number of negative samples, Z(+1)={i:y i =+1} and Z(-1)={i:y i =-1} respectively represent the positive and negative sample index sets; An optimization module, configured to optimize the objective function to obtain the optimal feature weight matrix W' and the optimal sample selection vector γ', A sample and feature selection module, configured to select the corresponding features according to the optimal feature weight matrix W', and select the corresponding samples according to the value of the optimal sample selection vector γ'; A classification or prediction module, configured to train the classification model or the prediction model using the selected samples and feature data to obtain a trained classification model or a trained prediction model, and the medical image data to be classified or to be predicted selects the features according to the obtained optimal feature weight matrix, and then inputs into the trained classification model or the trained prediction model to obtain the classification result or the prediction result.
5. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed to implement the method of any one of claims 1-3.
6. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method of any one of claims 1-3 when executing the program.
Citation Information
Patent Citations
Self-adaptive cost sensitive feature learning method for unbalanced JPEG image steganography detection
CN111415289A
Robust semi-supervised sparse feature selection method based on self-adjusting graph
CN111652265A