Image feature selection method, product, computer device and storage medium

By constructing and iteratively updating multiple matrices, the problem of intra-class correlation and inter-class separability coupling in embedded space is solved, and accurate clustering results are achieved.

CN119380063BActive Publication Date: 2025-04-29INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411961744.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-29
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In the embedding space, the intra-class correlation and inter-class separability of data are coupled to each other, and the separability between different data clusters cannot be highlighted, resulting in inaccurate clustering results.

Method used

By constructing the data matrix and sequentially constructing the similarity matrix, adaptive similarity matrix, low-dimensional embedding matrix, clustering indication matrix, orthogonal basis matrix and projection matrix, the objective function is obtained and these matrices iteratively updates to obtain a projection matrix that meets the termination condition, thereby selecting the optimal subset of features.

Benefits of technology

The intra-class correlation and inter-class separability of data decoupled in the embedded space are realized, highlighting the separability between different data clusters, and obtaining accurate clustering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380063B_ABST
    Figure CN119380063B_ABST
Patent Text Reader

Abstract

The present application relates to an image feature selection method, product, computer device and storage medium. The present application unifies adaptive graph learning, nonlinear spectral embedding, clustering structure mining items based on orthogonal non-negative decomposition, and linear feature space learning into a framework, in which linear embedding highlights the extraction of discriminant information, and nonlinear embedding emphasizes the retention of the intrinsic structure of the data, while being unified under the consistency of data partitioning. Adaptive graph learning can simultaneously consider the local essential structure and global clustering structure of manifold data. By introducing relaxation items based on orthogonal non-negative decomposition, low-dimensional embedding focuses on retaining the intrinsic structure of the data, while linear feature space learning emphasizes the extraction of data discriminant information. At the same time, the two have the same clustering structure to obtain accurate clustering results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to an image feature selection method, product, computer device and storage medium. Background Art

[0002] With the development of information technology, processing high-dimensional data has become very common in fields such as machine learning, pattern recognition, and computer vision. These high-dimensional data usually contain noise, irrelevant, and redundant information. Direct use of high-dimensional data will lead to huge pressure in computing and storage, and may also lead to problems such as overfitting and reduced model generalization performance. Therefore, dimensionality reduction has evolved into a key step for reducing the dimension of such high-dimensional data, effectively improving the efficiency of data processing. Feature extraction algorithms change the original numerical meaning of features, and require certain mathematical calculations when obtaining low-dimensional projections. Supervised feature selection algorithms need to obtain mathematical label information, which takes a lot of time and manpower in actual situations. Semi-supervised feature selection algorithms are more sensitive to the distribution of data, and their performance is greatly affected by labeled data. The spectral embedding algorithm unifies the preservation of the local essential structure of the data and the mining of the global clustering structure into one model by adding orthogonal non-negative constraints to the low-dimensional embedding, but this also leads to the coupling of intra-class correlation and inter-class separability of data in the embedding space, making it impossible for the algorithm to achieve the minimum cut of the graph. That is, adding orthogonal non-negative constraints to low-dimensional embeddings cannot highlight the separability between different categories, resulting in inaccurate embedding results. Summary of the invention

[0003] Based on this, an image feature selection method, apparatus, computer device and storage medium are provided to solve the problem that in the embedding space, the intra-class correlation and inter-class separability of data are coupled with each other, the separability between different data clusters cannot be highlighted, and inaccurate clustering results are easily obtained.

[0004] In one aspect, a method for selecting image features is provided, the method comprising:

[0005] Constructing a data matrix, and sequentially constructing a similarity matrix, an adaptive similarity matrix, a low-dimensional embedding matrix, a clustering indicator matrix, an orthogonal basis matrix, and a projection matrix according to the data matrix;

[0006] Obtaining an objective function according to the values ​​of the data matrix, the similarity matrix, the adaptive similarity matrix, the low-dimensional embedding matrix, the clustering indicator matrix, the orthogonal basis matrix, and the projection matrix;

[0007] Acquire original image data and fill the original image data into the data matrix to generate a target data matrix, and initialize the similarity matrix, the orthogonal basis matrix, the projection matrix, and the low-dimensional embedding matrix according to the target data matrix;

[0008] Iteratively updating the orthogonal basis matrix, the projection matrix, the similarity matrix, the clustering indicator matrix, and the low-dimensional embedding matrix to obtain a value of the objective function;

[0009] Whether an iterative update termination condition is satisfied is determined according to the value of the objective function. In response to satisfying the iterative update termination condition, an optimal feature subset is selected according to the current projection matrix.

[0010] In one embodiment, constructing a data matrix, sequentially constructing a similarity matrix, an adaptive similarity matrix, a low-dimensional embedding matrix, a clustering indicator matrix, an orthogonal basis matrix and a projection matrix according to the data matrix includes:

[0011] Constructing a data matrix, wherein the data matrix has n data points;

[0012] Based on the data matrix, an n×n dimensional similarity matrix is ​​constructed in the original space, wherein the elements in the similarity matrix are the similarities between two data points in the data matrix;

[0013] Add relaxation terms to the elements in the similarity matrix to form an n×n dimensional adaptive similarity matrix, perform nonlinear spectral embedding processing on the adaptive similarity matrix to form a low-dimensional embedding matrix, wherein the elements in the low-dimensional embedding matrix are the transpose of the low-dimensional embedding of the data points in the data matrix;

[0014] According to the low-dimensional embedding matrix, the adaptive similarity matrix is ​​updated by an adaptive graph learning method, and the local popular structure in the original space is retained;

[0015] Based on the low-dimensional embedding matrix, a cluster indicator matrix is ​​formed by using a K-means algorithm, and an orthogonal basis matrix is ​​obtained according to the cluster indicator matrix and a cluster structure calculation based on orthogonal non-negative decomposition of the cluster indicator matrix;

[0016] Feature selection is performed based on the data matrix to form a d×c dimensional projection matrix, where d is the original feature dimension of the data points in the data matrix, and c is the dimension of the projection space.

[0017] In one embodiment, in constructing the data matrix, the data matrix is ​​set to , represents the i-th data point in the data matrix;

[0018] In constructing an n×n dimensional similarity matrix in the original space based on the data matrix, the constructed similarity matrix is ,in Represents two data points and The similarity between The calculation method is: If yes One of the k nearest neighbors of yes If it is one of the k nearest neighbor points of , the similarity between the two is calculated by the radial basis function, otherwise it is set to 0.

[0019] In one embodiment, adding relaxation terms to the elements in the similarity matrix to form an n×n dimensional adaptive similarity matrix, and performing nonlinear spectral embedding processing on the adaptive similarity matrix to form a low dimensional embedding matrix comprises:

[0020] right Adding Relaxation Term And order , so that the adaptive similarity matrix is ,in , ;

[0021] The low-dimensional embedding matrix is ,in Represents data points The transpose of the low-dimensional embedding of .

[0022] In one embodiment, updating the adaptive similarity matrix by adaptive graph learning according to the low-dimensional embedding matrix to retain the local popular structure in the original space includes:

[0023] By solving Preserve the local manifold structure in the original space, where is a hyperparameter used to control the similarity between the adaptive similarity matrix and the similarity matrix.

[0024] In one embodiment, obtaining the objective function according to the values ​​of the data matrix, the similarity matrix, the adaptive similarity matrix, the low-dimensional embedding matrix, the clustering indicator matrix, the orthogonal basis matrix and the projection matrix comprises:

[0025] According to the data matrix, the similarity matrix, the adaptive similarity matrix, the low-dimensional embedding matrix and the projection matrix, combined with the adaptive graph learning part, the objective function is constructed as follows: ,in It is a hyperparameter used to control the weight of the regularization term. is a hyperparameter used to measure the weight of spectral embedding, W is the projection matrix; the objective function uses the projection matrix to project the original data into a low-dimensional subspace, and the L added to the projection matrix 2,1 The norm ensures row sparsity of the projection matrix;

[0026] Orthogonal non-negative decomposition is used to mine the clustering structure of nonlinear embedding. By introducing the orthogonal basis matrix and the cluster indicator matrix, the objective function becomes ; in, is a hyperparameter used to measure the weight of orthogonal non-negative decomposition, B is the orthogonal basis matrix, and E is the cluster indicator matrix; satisfying , I is the identity matrix;

[0027] Through mathematical transformation, the objective function becomes .

[0028] In one embodiment, initializing the similarity matrix, the orthogonal basis matrix, the projection matrix, and the low-dimensional embedding matrix according to the data matrix comprises:

[0029] Initialize the dimension c of the projection space and initialize the hyperparameters ;

[0030] Based on the data matrix, the cluster indicator matrix E is initialized using the K-means algorithm and calculated ,in represents a matrix obtained by taking the absolute values ​​of the elements in the cluster indicator matrix;

[0031] Initialize the projection matrix W as a random matrix and calculate the diagonal matrix D. The elements of the diagonal matrix D are , initialize the low-dimensional embedding matrix as , calculate the similarity matrix A.

[0032] In one embodiment, the iterative updating of the orthogonal basis matrix, the projection matrix, the similarity matrix, the clustering indicator matrix, and the low-dimensional embedding matrix to obtain the value of the objective function comprises:

[0033] Set the objective function to satisfy the constraints: ;

[0034] Pair Matrix Perform singular value decomposition to obtain its left eigenvector matrix V B , right eigenvector matrix U B , calculate the orthogonal basis matrix ,in The diagonal elements are 1 Dimensional matrix;

[0035] Calculate the projection matrix , updating the diagonal matrix D according to the projection matrix W and the cluster indication matrix E;

[0036] Solving using KKT conditions Questions obtained To update the adaptive similarity matrix, is the i-th row element in the similarity matrix, is the i-th row element in the adaptive similarity matrix, The jth element is A vector of

[0037] Pair Matrix Perform singular value decomposition to obtain its left eigenvector matrix V E , right eigenvector matrix U E ,calculate and ,in The diagonal elements are 1 Dimensional matrix;

[0038] Calculate the low-dimensional embedding matrix ,in , The diagonal elements are The diagonal matrix of ;

[0039] The value of the objective function is obtained according to the updated values ​​of the orthogonal basis matrix, the projection matrix, the similarity matrix, the clustering indication matrix, and the low-dimensional embedding matrix.

[0040] In one embodiment, judging whether the iterative update termination condition is satisfied according to the value of the objective function comprises:

[0041] Determine whether the difference between the values ​​of the objective function obtained from two adjacent iterations is less than a set threshold;

[0042] In response to the difference between the values ​​of the objective function obtained in two adjacent iterations being less than a set threshold, it is determined that the iterative update termination condition is met and the iterative update is stopped; otherwise, the iterative update is continued.

[0043] In one embodiment, judging whether the iterative update termination condition is satisfied according to the value of the objective function further comprises:

[0044] Determine whether the number of iterative updates reaches the set number;

[0045] In response to the iterative update number reaching the set number, it is determined that the iterative update termination condition is met and the iterative update is stopped, otherwise the iterative update continues.

[0046] In one embodiment, selecting the optimal feature subset according to the current projection matrix includes:

[0047] Initialize the number of features to be selected, p;

[0048] The L2 norms of the row vectors in the projection matrix are sorted, and the features corresponding to the first p largest row vectors are selected as the optimal feature subset.

[0049] In one embodiment, the image feature selection method further includes:

[0050] The image is reconstructed using the optimal feature subset.

[0051] In another aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0052] Constructing a data matrix, and sequentially constructing a similarity matrix, an adaptive similarity matrix, a low-dimensional embedding matrix, a clustering indicator matrix, an orthogonal basis matrix, and a projection matrix according to the data matrix;

[0053] Obtaining an objective function according to the values ​​of the data matrix, the similarity matrix, the adaptive similarity matrix, the low-dimensional embedding matrix, the clustering indicator matrix, the orthogonal basis matrix, and the projection matrix;

[0054] Acquire original image data and fill the original image data into the data matrix to generate a target data matrix, and initialize the similarity matrix, the orthogonal basis matrix, the projection matrix, and the low-dimensional embedding matrix according to the target data matrix;

[0055] Iteratively updating the orthogonal basis matrix, the projection matrix, the similarity matrix, the clustering indicator matrix, and the low-dimensional embedding matrix to obtain a value of the objective function;

[0056] Whether an iterative update termination condition is satisfied is determined according to the value of the objective function. In response to satisfying the iterative update termination condition, an optimal feature subset is selected according to the current projection matrix.

[0057] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0058] Constructing a data matrix, and sequentially constructing a similarity matrix, an adaptive similarity matrix, a low-dimensional embedding matrix, a clustering indicator matrix, an orthogonal basis matrix, and a projection matrix according to the data matrix;

[0059] Obtaining an objective function according to the values ​​of the data matrix, the similarity matrix, the adaptive similarity matrix, the low-dimensional embedding matrix, the clustering indicator matrix, the orthogonal basis matrix, and the projection matrix;

[0060] Acquire original image data and fill the original image data into the data matrix to generate a target data matrix, and initialize the similarity matrix, the orthogonal basis matrix, the projection matrix, and the low-dimensional embedding matrix according to the target data matrix;

[0061] Iteratively updating the orthogonal basis matrix, the projection matrix, the similarity matrix, the clustering indicator matrix, and the low-dimensional embedding matrix to obtain a value of the objective function;

[0062] Whether an iterative update termination condition is satisfied is determined according to the value of the objective function. In response to satisfying the iterative update termination condition, an optimal feature subset is selected according to the current projection matrix.

[0063] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0064] Constructing a data matrix, and sequentially constructing a similarity matrix, an adaptive similarity matrix, a low-dimensional embedding matrix, a clustering indicator matrix, an orthogonal basis matrix, and a projection matrix according to the data matrix;

[0065] Obtaining an objective function according to the values ​​of the data matrix, the similarity matrix, the adaptive similarity matrix, the low-dimensional embedding matrix, the clustering indicator matrix, the orthogonal basis matrix, and the projection matrix;

[0066] Acquire original image data and fill the original image data into the data matrix to generate a target data matrix, and initialize the similarity matrix, the orthogonal basis matrix, the projection matrix, and the low-dimensional embedding matrix according to the target data matrix;

[0067] Iteratively updating the orthogonal basis matrix, the projection matrix, the similarity matrix, the clustering indicator matrix, and the low-dimensional embedding matrix to obtain a value of the objective function;

[0068] Whether an iterative update termination condition is satisfied is determined according to the value of the objective function. In response to satisfying the iterative update termination condition, an optimal feature subset is selected according to the current projection matrix.

[0069] The above-mentioned image feature selection method, product, computer device and storage medium unify adaptive graph learning, nonlinear spectral embedding, clustering structure mining items based on orthogonal non-negative decomposition, and linear feature space learning into a framework, in which linear embedding emphasizes the extraction of discriminant information, and nonlinear embedding emphasizes the retention of the intrinsic structure of the data, while being unified under the consistency of data partitioning. Adaptive graph learning can simultaneously consider the local essential structure and global clustering structure of manifold data, and by introducing relaxation items based on orthogonal non-negative decomposition, low-dimensional embedding focuses on retaining the intrinsic structure of the data, while linear feature space learning emphasizes the extraction of data discriminant information, and both have the same clustering structure, so as to obtain accurate clustering results. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0071] Figure 1 This is an application environment diagram of the image feature selection method in one embodiment of the present application;

[0072] Figure 2 This is a flow chart of an image feature selection method in one embodiment of the present application;

[0073] Figure 3 A logic diagram of an image feature selection method in one embodiment of the present application;

[0074] Figure 4 This is a structural block diagram of an image feature selection device in one embodiment of the present application;

[0075] Figure 5 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0077] As described in the background technology, in general, dimensionality reduction can be divided into two categories: feature selection and feature extraction. Feature extraction projects the original high-dimensional data into a low-dimensional compact subspace, effectively retaining the intrinsic structure of the data, but feature extraction changes the original numerical value of the data features, and requires certain calculations to convert the features. Feature selection aims to select the most discriminative feature subsets from the original features using some specific evaluation criteria, retaining the original numerical meaning of the data features, and has stronger interpretability. Once the importance of different features is determined, feature selection can directly obtain a feature set with strong discriminability. Depending on whether the data is labeled, feature selection can be divided into supervised, semi-supervised and unsupervised. Since data in the real world usually does not have labels and labeling data requires a lot of time and labor costs, unsupervised feature selection is more realistic.

[0078] Since the data does not carry label information, unsupervised feature selection algorithms usually use clustering algorithms to mine pseudo-label information of the data to guide feature selection. Spectral clustering, as a partition-based clustering technique, has received widespread attention because it can achieve clusters of arbitrary shapes. However, the discrete constraints added by spectral clustering to the cluster indicator matrix make it an NP-hard problem to directly optimize it. The solution to this problem is usually to relax the discrete constraints into continuous constraints, but the relaxed spectral clustering (spectral embedding) results cannot be directly used as clustering results. K-means algorithm or spectral rotation algorithm is required to obtain discretized results. The classic spectral clustering algorithm belongs to the graph cutting-based method to mine clustering information in the data, while the relaxed spectral embedding algorithm emphasizes feature extraction and can effectively retain the intrinsic structure of the data. It is usually used in the low-dimensional embedding process of high-dimensional data. Replacing the discrete constraints added to the cluster indicator matrix in spectral clustering with orthogonal non-negative constraints, directly solving the spectral clustering problem becomes a feasible solution, and the interpretability of low-dimensional embedding is significantly improved. It is often used in unsupervised feature selection algorithms to guide feature selection. The spectral embedding algorithm introduces orthogonal non-negative constraints, which can directly obtain clustering information based on the embedding results while retaining the intrinsic structure of the data. However, there is a more serious problem: in the embedding space, the intra-class correlation and inter-class separability of the data are coupled with each other, which cannot highlight the separability between different data clusters and easily obtains inaccurate clustering results.

[0079] In traditional spectral clustering algorithms, in order to ensure that the cluster indicator matrix has label attributes, orthogonal non-negative constraints are often added to it. However, this orthogonal non-negative constraint has certain drawbacks. It will cause the intra-cluster correlation and inter-cluster separability of the data in the embedding space to couple with each other, thereby causing inaccurate embedding results. In view of the above-mentioned problems, the present invention proposes an image feature selection method based on double relaxation spectral embedding, which combines nonlinear spectral embedding, relaxation terms based on orthogonal non-negative decomposition, adaptive local structure learning, linear feature space learning and feature selection into a unified framework. Under this framework, adaptive graph learning can simultaneously consider the local essential structure and global clustering structure of manifold data. By introducing relaxation terms based on orthogonal non-negative decomposition, low-dimensional embedding focuses on retaining the intrinsic structure of data, while linear feature space learning emphasizes the extraction of data discriminant information. At the same time, the two have the same clustering structure to obtain accurate clustering results. Unlike other algorithms, this method no longer strictly follows the orthogonal non-negative constraints on nonlinear embedding as in traditional practices, but adds an additional relaxation term based on orthogonal non-negative decomposition to extract the clustering structure of data in this way. Moreover, this relaxation term connects the nonlinear embedding and the linear embedding, so that they can retain their own characteristics while having the same clustering structure.

[0080] The image feature selection method provided in this application can be applied to Figure 1 In the application environment shown in FIG. , the relationship between the data matrix X, the similarity matrix A, the adaptive similarity matrix S, the low-dimensional embedding matrix F, the clustering indicator matrix E, the orthogonal basis matrix B and the projection matrix W is shown.

[0081] In one embodiment, Figure 2 , Figure 3 As shown, a method for selecting image features is provided, comprising the following steps:

[0082] Step S1, constructing a data matrix X, and sequentially constructing a similarity matrix A, an adaptive similarity matrix S, a low-dimensional embedding matrix F, a clustering indicator matrix E, an orthogonal basis matrix B, and a projection matrix W according to the data matrix X;

[0083] Step S2, obtaining the objective function according to the values ​​of the data matrix X, the similarity matrix A, the adaptive similarity matrix S, the low-dimensional embedding matrix F, the clustering indicator matrix E, the orthogonal basis matrix B and the projection matrix W;

[0084] Step S3, obtaining the original image data and filling the original image data into the data matrix X to generate a target data matrix, and initializing the similarity matrix A, the orthogonal basis matrix B, the projection matrix W, and the low-dimensional embedding matrix F according to the target data matrix;

[0085] Step S4, iteratively updating the orthogonal basis matrix B, the projection matrix W, the similarity matrix S, the clustering indicator matrix E, and the low-dimensional embedding matrix F to obtain the value of the objective function;

[0086] Step S5, judging whether the iterative update termination condition is satisfied according to the value of the objective function, and selecting the optimal feature subset W' according to the current projection matrix W in response to satisfying the iterative update termination condition.

[0087] Among them, adaptive graph learning, nonlinear spectral embedding, clustering structure mining items based on orthogonal non-negative decomposition, and linear feature space learning are unified into one framework. In this framework, linear embedding emphasizes the extraction of discriminant information, and nonlinear embedding emphasizes the retention of the intrinsic structure of the data, while they are unified under the consistency of data partitioning. Adaptive graph learning can simultaneously consider the local essential structure and global clustering structure of manifold data. By introducing relaxation items based on orthogonal non-negative decomposition, low-dimensional embedding focuses on retaining the intrinsic structure of the data, while linear feature space learning emphasizes the extraction of data discriminant information. At the same time, the two have the same clustering structure, and accurate clustering results are obtained.

[0088] By introducing the clustering structure mining item based on orthogonal non-negative decomposition, the orthogonal non-negative constraints of low-dimensional embedding are relaxed. This item solves the problem of the coupling between intra-class correlation and inter-class separability of data in the embedding space, and connects linear embedding and nonlinear embedding through the segmentation consistency of data. It ensures that linear embedding and nonlinear embedding have the same clustering structure while retaining their respective characteristics. Specifically, linear embedding emphasizes the extraction of data discriminant information, while nonlinear embedding emphasizes retaining the intrinsic structure of data.

[0089] In this embodiment, a data matrix X is constructed, and a similarity matrix A, an adaptive similarity matrix S, a low-dimensional embedding matrix F, a clustering indicator matrix E, an orthogonal basis matrix B, and a projection matrix W are sequentially constructed according to the data matrix X, including:

[0090] Construct a data matrix X, which has n data points;

[0091] Based on the data matrix X, an n×n dimensional similarity matrix A is constructed in the original space. The elements in the similarity matrix A are the similarities between two data points in the data matrix X.

[0092] Add relaxation terms to the elements in the similarity matrix A to form an n×n dimensional adaptive similarity matrix S, perform nonlinear spectral embedding processing on the adaptive similarity matrix S to form a low-dimensional embedding matrix F, and the elements in the low-dimensional embedding matrix F are the transpose of the low-dimensional embedding of the data points in the data matrix X;

[0093] According to the low-dimensional embedding matrix F, the adaptive similarity matrix S is updated through adaptive graph learning to preserve the local popular structure in the original space;

[0094] Based on the low-dimensional embedding matrix F, a clustering indicator matrix E is formed by using the K-means algorithm, and an orthogonal basis matrix B is obtained according to the clustering indicator matrix E and the clustering structure calculation of the clustering indicator matrix E based on the orthogonal non-negative decomposition;

[0095] Feature selection is performed based on the data matrix X to form a d×c-dimensional projection matrix W, where d is the original feature dimension of the data points in the data matrix X and c is the dimension of the projection space.

[0096] Among them, the K-means algorithm is a commonly used clustering algorithm. Its core idea is to divide the data into K clusters in an iterative manner so that the data in the same cluster are as similar as possible, while the data between different clusters are as different as possible.

[0097] Adaptive graph learning is performed in the original space and nonlinear embedding space. Therefore, the clustering structure in the embedding result can be fed back to the local structure learning, which not only reduces the impact of noise and abnormal information, but also enables graph learning to consider both the local essential structure and the global clustering structure of the data.

[0098] In this embodiment, in constructing the data matrix X, the data matrix is ​​set to , represents the i-th data point in the data matrix;

[0099] Based on the data matrix X, an n×n dimensional similarity matrix A is constructed in the original space. The constructed similarity matrix is ,in Represents two data points and The similarity between The calculation method is: If yes One of the k nearest neighbors of yes If it is one of the k nearest neighbor points of , the similarity between the two is calculated by the radial basis function, otherwise it is set to 0.

[0100] In this embodiment, adding relaxation terms to the elements in the similarity matrix A to form an n×n dimensional adaptive similarity matrix S, and performing nonlinear spectral embedding processing on the adaptive similarity matrix S to form a low-dimensional embedding matrix F includes:

[0101] right Adding Relaxation Term And order , so that the adaptive similarity matrix is ,in , ;

[0102] The low-dimensional embedding matrix is ,in Represents data points The transpose of the low-dimensional embedding of .

[0103] Since the similarity matrix is ​​calculated in the original space, and the actual data usually contains a lot of noise, the quality of the similarity matrix is ​​poor, which will affect the performance of the subsequent algorithm. Adding Relaxation Term And order , and get the adaptive similarity matrix S.

[0104] Relaxation term is an orthogonal non-negative relaxation term. First, it can decouple the intra-class correlation and inter-class separability of data in the embedding space, improving the accuracy of the embedding results; second, it acts as a bridge between linear embedding and nonlinear embedding, connecting linear embedding and nonlinear embedding through clustering consistency, so that the two have the same clustering structure while retaining their respective characteristics, that is, linear embedding emphasizes the extraction of discriminative information, and nonlinear embedding emphasizes the retention of local structure.

[0105] In this embodiment, the adaptive similarity matrix S is updated by adaptive graph learning according to the low-dimensional embedding matrix F, and the local popular structure in the original space is retained, including:

[0106] By solving Preserve the local manifold structure in the original space, where It is a hyperparameter used to control the similarity between the adaptive similarity matrix and the similarity matrix.

[0107] In the above function, the following constraints need to be met: the similarity value is greater than 0 and less than 1, and the sum of the similarities of each point with other points is 1, that is, , Represents data points The transpose of the low-dimensional embedding. In this part, the low-dimensional embedding is obtained by retaining the local structure described in the similarity matrix, and the similarity matrix is ​​adaptively adjusted according to the low-dimensional embedding and the similarity matrix constructed in the original space. The two promote each other and jointly improve the ability of the algorithm to mine the local manifold structure of the data. At the same time, minimizing the error between the adaptive similarity matrix S and the similarity matrix A can ensure that the adaptive similarity matrix S can retain the geometric structure of the data in the original space to the greatest extent, while its adaptability reduces the impact of noise in the data.

[0108] In this embodiment, obtaining the objective function according to the values ​​of the data matrix X, the similarity matrix A, the adaptive similarity matrix S, the low-dimensional embedding matrix F, the clustering indicator matrix E, the orthogonal basis matrix B and the projection matrix W includes:

[0109] According to the data matrix X, similarity matrix A, adaptive similarity matrix S, low-dimensional embedding matrix F and projection matrix W, combined with the adaptive graph learning part, the objective function is constructed as follows: ,in It is a hyperparameter used to control the weight of the regularization term. It is a hyperparameter used to measure the weight of spectral embedding, W is the projection matrix; the objective function uses the projection matrix to project the original data into a low-dimensional subspace, and the L added to the projection matrix W 2,1 The norm ensures the row sparsity of the projection matrix;

[0110] Orthogonal non-negative decomposition is used to mine the clustering structure of nonlinear embedding. By introducing the orthogonal basis matrix B and the cluster indicator matrix E, the objective function becomes ; in, It is a hyperparameter used to measure the weight of orthogonal non-negative decomposition, B is the orthogonal basis matrix, and E is the cluster indicator matrix E; satisfy , I is the identity matrix;

[0111] Through mathematical transformation, the objective function becomes .

[0112] In the linear embedding and feature selection part, we construct a linear regression model for feature selection. Assuming that the projection matrix is , also known as the feature selection matrix, where d is the original feature dimension of the data, c is the dimension of the projection space (the number of data categories is selected as the dimension of the projection space), combined with the adaptive graph learning part, the objective function becomes:

[0113] The objective function uses the projection matrix to project the original data into a low-dimensional subspace, and the L added to the projection matrix W 2,1 The norm ensures the row sparsity of the projection matrix. The row vectors corresponding to the noise features in the projection matrix tend to 0 during the optimization process. Therefore, feature selection can be performed by calculating the L2 norm of the row vectors of the projection matrix. In the above function, It belongs to linear embedding and is used to extract the discriminant information of the data. F belongs to nonlinear embedding and is used to preserve the local manifold structure of the data.

[0114] In the connection between linear embedding and nonlinear embedding, the present invention introduces a clustering structure mining item, thereby realizing the decoupling of intra-cluster correlation and inter-cluster separability of data in the embedding space. Studies have shown that nonlinear low-dimensional embedding of high-dimensional data usually exhibits different subspace characteristics, that is, different data clusters are embedded in different subspaces. Therefore, the present invention chooses to use orthogonal non-negative decomposition to mine the clustering structure of nonlinear embedding, by introducing the orthogonal basis matrix and the cluster indicator matrix , the objective function is:

[0115]

[0116] Through mathematical transformation, the above formula is equivalent to:

[0117]

[0118] Among them, the objective function is relatively complex and it is very difficult to solve it directly. A simple but effective iterative solution algorithm is designed for this objective function, and a corresponding implementation scheme is proposed. The adverse effects of adding orthogonal non-negative constraints in spectral embedding are solved, and the algorithm's ability to retain the essential structure of the data and its feature selection ability are improved.

[0119] In this embodiment, initializing the similarity matrix A, the orthogonal basis matrix B, the projection matrix W, and the low-dimensional embedding matrix F according to the data matrix X includes:

[0120] Initialize the dimension c of the projection space and initialize the hyperparameters ;

[0121] Based on the data matrix X, the K-means algorithm is used to initialize the cluster indicator matrix E and calculate ,in represents the matrix obtained by taking the absolute value of the elements in the cluster indicator matrix E;

[0122] Initialize the projection matrix W as a random matrix and calculate the diagonal matrix D. The elements of the diagonal matrix D are , initialize the low-dimensional embedding matrix as , calculate the similarity matrix A.

[0123] In this embodiment, iteratively updating the orthogonal basis matrix B, the projection matrix W, the similarity matrix S, the clustering indicator matrix E, and the low-dimensional embedding matrix F to obtain the value of the objective function includes:

[0124] Let the value of the objective function be a fixed value J, and the objective function satisfies the constraints: ;

[0125] Pair Matrix Perform singular value decomposition to obtain its left eigenvector matrix VB , right eigenvector matrix U B , calculate the orthogonal basis matrix ,in The diagonal elements are 1 Dimensional matrix;

[0126] The diagonal matrix D is calculated based on the projection matrix W and the cluster indicator matrix E, satisfying ;

[0127] Solving using KKT conditions Questions obtained To update the adaptive similarity matrix S, where is the i-th row element in the similarity matrix A, is the i-th row element in the adaptive similarity matrix S, The jth element is A vector of

[0128] Pair Matrix Perform singular value decomposition to obtain its left eigenvector matrix V E , right eigenvector matrix U E ,calculate and ,in The diagonal elements are 1 Dimensional matrix;

[0129] Compute low-dimensional embedding matrix ,in , The diagonal elements are The diagonal matrix of ;

[0130] The value of the objective function is obtained according to the values ​​of the updated orthogonal basis matrix, projection matrix, similarity matrix, clustering indicator matrix, and low-dimensional embedding matrix.

[0131] Among them, the ‌KKT condition (Karush-Kuhn-Tucker conditions)‌ is one of the most important results in the field of optimization problems, especially nonlinear programming. It is a necessary condition for determining whether a point is an extreme point. For convex programming problems, the KKT condition is not only a necessary condition, but also a sufficient condition, that is, the point that satisfies the KKT condition must be an extreme point and must be the global optimal solution.

[0132] Setting the objective function needs to satisfy the following constraints: .right The constraint introduces a clustering structure with an orthogonal basis as the clustering center into the low-dimensional embedding, while the constraint on E ensures that E has label attributes. The manifold hypothesis assumes that the same cluster labels exist in high-density regions of the low-dimensional data manifold, and spectral embedding is based on this assumption. However, in high-dimensional sparse data, the above assumption does not hold, and the clustering indicator matrix of high-dimensional data can always be embedded in the linear space spanned by the data. Therefore, the linear regression model in the above formula can be regarded as a linear regularization term added to the spectral embedding to solve the problem that the manifold assumption does not hold. Once the clustering structure of the data is determined, the linear regression term highlights the data discriminant information, and the nonlinear spectral embedding can be regarded as a nonlinear relaxation based on the clustering information, emphasizing the local structure of the data. ‌

[0133] In this embodiment, judging whether the iterative update termination condition is satisfied according to the value of the objective function includes:

[0134] Determine whether the difference between the values ​​of the objective function obtained from two adjacent iterations is less than a set threshold;

[0135] In response to the difference between the values ​​of the objective function obtained in two adjacent iterations being less than a set threshold, it is determined that the iterative update termination condition is met and the iterative update is stopped; otherwise, the iterative update is continued.

[0136] In this embodiment, judging whether the iterative update termination condition is satisfied according to the value of the objective function further includes:

[0137] Determine whether the number of iterative updates reaches the set number;

[0138] In response to the iterative update number reaching the set number, it is determined that the iterative update termination condition is met and the iterative update is stopped, otherwise the iterative update continues.

[0139] In this embodiment, selecting the optimal feature subset W' according to the current projection matrix W includes:

[0140] Initialize the number of features to be selected, p;

[0141] Sort the L2 norms of each row vector in the projection matrix W, and select the features corresponding to the first p largest row vectors as the optimal feature subset W'.

[0142] Among them, by judging the termination of iterative updating, the projection matrix W that meets the preset conditions can be obtained in time.

[0143] like Figure 2 As shown, in this embodiment, the image feature selection method further includes:

[0144] Step S6: reconstruct the image using the optimal feature subset W'.

[0145] Among them, reconstructing the image using the optimal feature subset W' can improve the image features.

[0146] It is understandable that the image reconstruction using the optimal feature subset W' includes:

[0147] Acquire a target image corresponding to the original image data;

[0148] Identifying image data corresponding to the optimal feature subset W' in the original image data of the target image, and setting an enhanced label;

[0149] The original image data with the enhancement tag set is enhanced in the target image, and the remaining original image data in the target image is deleted to form a reconstructed image.

[0150] The image reconstruction is performed based on the target image corresponding to the original image data in combination with the optimal feature subset W', so that the target image features are kept the same, the original features are retained, and the reconstructed image is clearer.

[0151] In the above-mentioned image feature selection method, adaptive graph learning, nonlinear spectral embedding, clustering structure mining items based on orthogonal non-negative decomposition, and linear feature space learning are unified into a framework. In this framework, linear embedding emphasizes the extraction of discriminant information, and nonlinear embedding emphasizes the retention of the intrinsic structure of the data, while being unified under the consistency of data division. Adaptive graph learning can simultaneously consider the local essential structure and global clustering structure of manifold data. By introducing relaxation items based on orthogonal non-negative decomposition, low-dimensional embedding focuses on retaining the intrinsic structure of the data, while linear feature space learning emphasizes the extraction of data discriminant information. At the same time, the two have the same clustering structure, and accurate clustering results are obtained.

[0152] In one embodiment, Figure 4 As shown, an image feature selection device 10 is provided, comprising: an image conversion module 1, an initialization module 2, an objective function acquisition module 3, an update module 4, a judgment module 5 and a feature selection module 6.

[0153] The image conversion module 1 is used to construct a data matrix X, and construct a similarity matrix A, an adaptive similarity matrix S, a low-dimensional embedding matrix F, a clustering indicator matrix E, an orthogonal basis matrix B and a projection matrix W in sequence according to the data matrix X.

[0154] Initialization module 2 is used to obtain the original image data and fill the original image data into the data matrix X to generate the target data matrix, and initialize the similarity matrix A, orthogonal basis matrix B, projection matrix W, and low-dimensional embedding matrix F according to the target data matrix; it is used to initialize hyperparameters, including the number of data categories. , projection space dimension m, selected feature number p, various regularization parameters .

[0155] The objective function acquisition module 3 is used to obtain the objective function according to the values ​​of the data matrix X, the similarity matrix A, the adaptive similarity matrix S, the low-dimensional embedding matrix F, the clustering indicator matrix E, the orthogonal basis matrix B and the projection matrix W.

[0156] The updating module 4 is used to iteratively update the orthogonal basis matrix B, the projection matrix W, the similarity matrix S, the clustering indicator matrix E, and the low-dimensional embedding matrix F to obtain the value of the objective function.

[0157] The judgment module 5 is used to judge whether the iterative update termination condition is met according to the value of the objective function.

[0158] The feature selection module 6 is used to select the optimal feature subset W' according to the current projection matrix W in response to satisfying the iterative update termination condition.

[0159] In this embodiment, a data matrix X is constructed, and a similarity matrix A, an adaptive similarity matrix S, a low-dimensional embedding matrix F, a clustering indicator matrix E, an orthogonal basis matrix B, and a projection matrix W are sequentially constructed according to the data matrix X, including:

[0160] Construct a data matrix X, which has n data points;

[0161] Based on the data matrix X, an n×n dimensional similarity matrix A is constructed in the original space. The elements in the similarity matrix A are the similarities between two data points in the data matrix X.

[0162] Add relaxation terms to the elements in the similarity matrix A to form an n×n dimensional adaptive similarity matrix S, perform nonlinear spectral embedding processing on the adaptive similarity matrix S to form a low-dimensional embedding matrix F, and the elements in the low-dimensional embedding matrix F are the transpose of the low-dimensional embedding of the data points in the data matrix X;

[0163] According to the low-dimensional embedding matrix F, the adaptive similarity matrix S is updated through adaptive graph learning to preserve the local popular structure in the original space;

[0164] Based on the low-dimensional embedding matrix F, a clustering indicator matrix E is formed by using the K-means algorithm, and an orthogonal basis matrix B is obtained according to the clustering indicator matrix E and the clustering structure calculation of the clustering indicator matrix E based on the orthogonal non-negative decomposition;

[0165] Feature selection is performed based on the data matrix X to form a d×c-dimensional projection matrix W, where d is the original feature dimension of the data points in the data matrix X and c is the dimension of the projection space.

[0166] In this embodiment, in constructing the data matrix X, the data matrix is ​​set to , represents the i-th data point in the data matrix;

[0167] Based on the data matrix X, an n×n dimensional similarity matrix A is constructed in the original space. The constructed similarity matrix is ,in Represents two data points and The similarity between The calculation method is: If yes One of the k nearest neighbors of yes If it is one of the k nearest neighbor points of , the similarity between the two is calculated by the radial basis function, otherwise it is set to 0.

[0168] In this embodiment, adding relaxation terms to the elements in the similarity matrix A to form an n×n dimensional adaptive similarity matrix S, and performing nonlinear spectral embedding processing on the adaptive similarity matrix S to form a low-dimensional embedding matrix F includes:

[0169] right Adding Relaxation Term And order , so that the adaptive similarity matrix is ,in , ;

[0170] The low-dimensional embedding matrix is ,in Represents data points The transpose of the low-dimensional embedding of .

[0171] In this embodiment, the adaptive similarity matrix S is updated by adaptive graph learning according to the low-dimensional embedding matrix F, and the local popular structure in the original space is retained, including:

[0172] By solving Preserve the local manifold structure in the original space, where It is a hyperparameter used to control the similarity between the adaptive similarity matrix and the similarity matrix.

[0173] In this embodiment, obtaining the objective function according to the values ​​of the data matrix X, the similarity matrix A, the adaptive similarity matrix S, the low-dimensional embedding matrix F, the clustering indicator matrix E, the orthogonal basis matrix B and the projection matrix W includes:

[0174] According to the data matrix X, similarity matrix A, adaptive similarity matrix S, low-dimensional embedding matrix F and projection matrix W, combined with the adaptive graph learning part, the objective function is constructed as follows: ,in It is a hyperparameter used to control the weight of the regularization term. It is a hyperparameter used to measure the weight of spectral embedding, W is the projection matrix; the objective function uses the projection matrix to project the original data into a low-dimensional subspace, and the L added to the projection matrix W 2,1 The norm ensures the row sparsity of the projection matrix;

[0175] Orthogonal non-negative decomposition is used to mine the clustering structure of nonlinear embedding. By introducing the orthogonal basis matrix B and the cluster indicator matrix E, the objective function becomes ;in, It is a hyperparameter used to measure the weight of orthogonal non-negative decomposition, B is the orthogonal basis matrix, and E is the cluster indicator matrix E; satisfy , I is the identity matrix;

[0176] Through mathematical transformation, the objective function becomes .

[0177] In this embodiment, initializing the similarity matrix A, the orthogonal basis matrix B, the projection matrix W, and the low-dimensional embedding matrix F according to the data matrix X includes:

[0178] Initialize the dimension c of the projection space and initialize the hyperparameters ;

[0179] Based on the data matrix X, the K-means algorithm is used to initialize the cluster indicator matrix E and calculate ,in represents the matrix obtained by taking the absolute value of the elements in the cluster indicator matrix E;

[0180] Initialize the projection matrix W as a random matrix and calculate the diagonal matrix D. The elements of the diagonal matrix D are , initialize the low-dimensional embedding matrix as , calculate the similarity matrix A.

[0181] In this embodiment, iteratively updating the orthogonal basis matrix B, the projection matrix W, the similarity matrix S, the clustering indicator matrix E, and the low-dimensional embedding matrix F to obtain the value of the objective function includes:

[0182] Set the objective function to satisfy the constraints: ;

[0183] Pair Matrix Perform singular value decomposition to obtain its left eigenvector matrix V B , right eigenvector matrix U B , calculate the orthogonal basis matrix ,in The diagonal elements are 1 Dimensional matrix;

[0184] Calculating the projection matrix , update the diagonal matrix D according to the projection matrix W and the cluster indicator matrix E;

[0185] Solving using KKT conditions Questions obtained To update the adaptive similarity matrix S, where is the i-th row element in the similarity matrix A, is the i-th row element in the adaptive similarity matrix S, The jth element is A vector of

[0186] Pair Matrix Perform singular value decomposition to obtain its left eigenvector matrix V E , right eigenvector matrix U E ,calculate and ,in The diagonal elements are 1 Dimensional matrix;

[0187] Compute low-dimensional embedding matrix ,in , The diagonal elements are The diagonal matrix of ;

[0188] The value of the objective function is obtained according to the values ​​of the updated orthogonal basis matrix, projection matrix, similarity matrix, clustering indicator matrix, and low-dimensional embedding matrix.

[0189] In this embodiment, judging whether the iterative update termination condition is satisfied according to the value of the objective function includes:

[0190] Determine whether the difference between the values ​​of the objective function obtained from two adjacent iterations is less than a set threshold;

[0191] In response to the difference between the values ​​of the objective function obtained in two adjacent iterations being less than a set threshold, it is determined that the iterative update termination condition is met and the iterative update is stopped; otherwise, the iterative update is continued.

[0192] In this embodiment, judging whether the iterative update termination condition is satisfied according to the value of the objective function further includes:

[0193] Determine whether the number of iterative updates reaches the set number;

[0194] In response to the iterative update number reaching the set number, it is determined that the iterative update termination condition is met and the iterative update is stopped, otherwise the iterative update continues.

[0195] In this embodiment, selecting the optimal feature subset W' according to the current projection matrix W includes:

[0196] Initialize the number of features to be selected, p;

[0197] Sort the L2 norms of each row vector in the projection matrix W, and select the features corresponding to the first p largest row vectors as the optimal feature subset W'.

[0198] In this embodiment, if Figure 4 As shown, the image feature selection device 10 further includes: an image reconstruction module 7 .

[0199] The image reconstruction module 7 is used to reconstruct the image using the optimal feature subset W'.

[0200] In the above-mentioned image feature selection device, adaptive graph learning, nonlinear spectral embedding, clustering structure mining items based on orthogonal non-negative decomposition, and linear feature space learning are unified into a framework, in which linear embedding highlights the extraction of discriminant information, and nonlinear embedding emphasizes the retention of the intrinsic structure of the data, while being unified under the consistency of data division. Adaptive graph learning can simultaneously consider the local essential structure and global clustering structure of manifold data. By introducing relaxation items based on orthogonal non-negative decomposition, low-dimensional embedding focuses on retaining the intrinsic structure of the data, while linear feature space learning emphasizes the extraction of data discriminant information. At the same time, the two have the same clustering structure, and accurate clustering results are obtained.

[0201] For the specific definition of the image feature selection device, please refer to the definition of the image feature selection method above, which will not be repeated here. Each module in the above-mentioned image feature selection device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0202] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store image feature selection data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an image feature selection method is implemented.

[0203] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0204] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0205] Construct a data matrix X, and construct a similarity matrix A, an adaptive similarity matrix S, a low-dimensional embedding matrix F, a clustering indicator matrix E, an orthogonal basis matrix B, and a projection matrix W in sequence according to the data matrix X;

[0206] Obtain the objective function according to the values ​​of the data matrix X, the similarity matrix A, the adaptive similarity matrix S, the low-dimensional embedding matrix F, the clustering indicator matrix E, the orthogonal basis matrix B and the projection matrix W;

[0207] Obtain the original image data and fill the original image data into the data matrix X to generate the target data matrix, and initialize the similarity matrix A, orthogonal basis matrix B, projection matrix W, and low-dimensional embedding matrix F according to the target data matrix;

[0208] Iteratively update the orthogonal basis matrix B, projection matrix W, similarity matrix S, cluster indicator matrix E, and low-dimensional embedding matrix F to obtain the value of the objective function;

[0209] Whether the iterative update termination condition is satisfied is determined according to the value of the objective function. In response to satisfying the iterative update termination condition, the optimal feature subset W' is selected according to the current projection matrix W.

[0210] For specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the method for selecting image features above, which will not be repeated here.

[0211] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0212] Construct a data matrix X, and construct a similarity matrix A, an adaptive similarity matrix S, a low-dimensional embedding matrix F, a clustering indicator matrix E, an orthogonal basis matrix B, and a projection matrix W in sequence according to the data matrix X;

[0213] Obtain the objective function according to the values ​​of the data matrix X, the similarity matrix A, the adaptive similarity matrix S, the low-dimensional embedding matrix F, the clustering indicator matrix E, the orthogonal basis matrix B and the projection matrix W;

[0214] Obtain the original image data and fill the original image data into the data matrix X to generate the target data matrix, and initialize the similarity matrix A, orthogonal basis matrix B, projection matrix W, and low-dimensional embedding matrix F according to the target data matrix;

[0215] Iteratively update the orthogonal basis matrix B, projection matrix W, similarity matrix S, cluster indicator matrix E, and low-dimensional embedding matrix F to obtain the value of the objective function;

[0216] Whether the iterative update termination condition is satisfied is determined according to the value of the objective function. In response to satisfying the iterative update termination condition, the optimal feature subset W' is selected according to the current projection matrix W.

[0217] For specific limitations on the steps implemented when the processor executes the computer program, please refer to the limitations on the method for selecting image features above, which will not be repeated here.

[0218] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0219] Construct a data matrix X, and construct a similarity matrix A, an adaptive similarity matrix S, a low-dimensional embedding matrix F, a clustering indicator matrix E, an orthogonal basis matrix B, and a projection matrix W in sequence according to the data matrix X;

[0220] Obtain the objective function according to the values ​​of the data matrix X, the similarity matrix A, the adaptive similarity matrix S, the low-dimensional embedding matrix F, the clustering indicator matrix E, the orthogonal basis matrix B and the projection matrix W;

[0221] Obtain the original image data and fill the original image data into the data matrix X to generate the target data matrix, and initialize the similarity matrix A, orthogonal basis matrix B, projection matrix W, and low-dimensional embedding matrix F according to the target data matrix;

[0222] Iteratively update the orthogonal basis matrix B, projection matrix W, similarity matrix S, cluster indicator matrix E, and low-dimensional embedding matrix F to obtain the value of the objective function;

[0223] Whether the iterative update termination condition is satisfied is determined according to the value of the objective function. In response to satisfying the iterative update termination condition, the optimal feature subset W' is selected according to the current projection matrix W.

[0224] For specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the method for selecting image features above, which will not be repeated here.

[0225] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0226] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0227] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for selecting image features, characterized in that: include: Construct a data matrix, and sequentially construct a similarity matrix, an adaptive similarity matrix, a low-dimensional embedding matrix, a clustering indicator matrix, an orthogonal basis matrix and a projection matrix according to the data matrix, including: adding relaxation terms to the elements in the similarity matrix to form an n×n-dimensional adaptive similarity matrix, performing nonlinear spectral embedding processing on the adaptive similarity matrix to form a low-dimensional embedding matrix, wherein the elements in the low-dimensional embedding matrix are the transpose of the low-dimensional embedding of the data points in the data matrix; updating the adaptive similarity matrix by an adaptive graph learning method according to the low-dimensional embedding matrix, and retaining the local popular structure in the original space; forming a clustering indicator matrix based on the low-dimensional embedding matrix using a K-means algorithm, and obtaining an orthogonal basis matrix according to the clustering indicator matrix and the clustering structure calculation of the clustering indicator matrix based on orthogonal non-negative decomposition; Obtaining an objective function according to the values ​​of the data matrix, the similarity matrix, the adaptive similarity matrix, the low-dimensional embedding matrix, the clustering indicator matrix, the orthogonal basis matrix, and the projection matrix; Acquire original image data and fill the original image data into the data matrix to generate a target data matrix, and initialize the similarity matrix, the orthogonal basis matrix, the projection matrix, and the low-dimensional embedding matrix according to the target data matrix; Iteratively updating the orthogonal basis matrix, the projection matrix, the similarity matrix, the clustering indicator matrix, and the low-dimensional embedding matrix to obtain a value of the objective function; Whether an iterative update termination condition is satisfied is determined according to the value of the objective function. In response to satisfying the iterative update termination condition, an optimal feature subset is selected according to the current projection matrix.

2. The image feature selection method according to claim 1, characterized in that: The constructing of the data matrix, sequentially constructing a similarity matrix, an adaptive similarity matrix, a low-dimensional embedding matrix, a clustering indicator matrix, an orthogonal basis matrix and a projection matrix according to the data matrix, further comprises: Constructing a data matrix, wherein the data matrix has n data points; Based on the data matrix, an n×n dimensional similarity matrix is ​​constructed in the original space, wherein the elements in the similarity matrix are the similarities between two data points in the data matrix; Feature selection is performed based on the data matrix to form a d×c dimensional projection matrix, where d is the original feature dimension of the data points in the data matrix X, and c is the dimension of the projection space.

3. The image feature selection method according to claim 2, characterized in that: In the construction of the data matrix, the data matrix is ​​set to X = [x1 x 2··· x n ], x i represents the i-th data point in the data matrix; In constructing an n×n dimensional similarity matrix in the original space based on the data matrix, the constructed similarity matrix is where a ij Represents two data points x i With x j The similarity between ij The calculation method is: if x i is x j One of the k nearest neighbors or x j is x i If it is one of the k nearest neighbor points of , the similarity between the two is calculated by the radial basis function, otherwise it is set to 0.

4. The image feature selection method according to claim 3, characterized in that: The adding relaxation terms to the elements in the similarity matrix to form an n×n dimensional adaptive similarity matrix, and performing nonlinear spectrum embedding processing on the adaptive similarity matrix to form a low dimensional embedding matrix comprises: to a ij Add relaxation term ε ij And let s ij =a ij -ε ij , so that the adaptive similarity matrix is Where 0≤s ij ≤1,Σ j s ij =1; The low-dimensional embedding matrix is ​​F = [f1 f2 … f n ] T , where f i Represents data point x i The transpose of the low-dimensional embedding of .

5. The image feature selection method according to claim 4, characterized in that: The updating of the adaptive similarity matrix by adaptive graph learning according to the low-dimensional embedding matrix to retain the local popular structure in the original space includes: By solving The local manifold structure in the original space is retained, wherein β is a hyperparameter used to control the similarity between the adaptive similarity matrix and the similarity matrix.

6. The image feature selection method according to claim 4, characterized in that: The obtaining of the objective function according to the values ​​of the data matrix, the similarity matrix, the adaptive similarity matrix, the low-dimensional embedding matrix, the clustering indicator matrix, the orthogonal basis matrix and the projection matrix comprises: According to the data matrix, the similarity matrix, the adaptive similarity matrix, the low-dimensional embedding matrix and the projection matrix, combined with the adaptive graph learning part, the objective function is constructed as follows: Where η is a hyperparameter used to control the weight of the regularization term, γ is a hyperparameter used to measure the weight of the spectral embedding, and W is the projection matrix; the objective function uses the projection matrix to project the original data into a low-dimensional subspace, and the L added to the projection matrix 2,1 The norm ensures row sparsity of the projection matrix; Orthogonal non-negative decomposition is used to mine the clustering structure of nonlinear embedding. By introducing the orthogonal basis matrix and the cluster indicator matrix, the objective function becomes Among them, α is a hyperparameter used to measure the weight of orthogonal non-negative decomposition, B is the orthogonal basis matrix, and E is the cluster indicator matrix; satisfying B T B=I,E T E=I,E≥0, I is the unit matrix; Through mathematical transformation, the objective function becomes Where L S =PS, P is the diagonal element The diagonal matrix of .

7. The image feature selection method according to claim 6, characterized in that: Initializing the similarity matrix, the orthogonal basis matrix, the projection matrix, and the low-dimensional embedding matrix according to the data matrix comprises: Initialize the dimension c of the projection space and the hyperparameters α, β, γ, η; Based on the data matrix, the cluster indicator matrix E is initialized using the K-means algorithm and calculated Wherein |E| represents a matrix obtained by taking the absolute values ​​of the elements in the cluster indicator matrix; Initialize the projection matrix W as a random matrix and calculate the diagonal matrix D. The elements of the diagonal matrix D are Initialize the low-dimensional embedding matrix to F = X T W, calculate the similarity matrix A.

8. The image feature selection method according to claim 7, characterized in that: The iterative updating of the orthogonal basis matrix, the projection matrix, the similarity matrix, the clustering indicator matrix, and the low-dimensional embedding matrix to obtain the value of the objective function includes: Set the objective function to satisfy the constraint condition: 0≤s ij ≤1,∑ j s ij =1,B T B=I,E T E=I,E≥0; For the matrix E T F T Perform singular value decomposition to obtain its left eigenvector matrix V B , right eigenvector matrix U B , calculate the orthogonal basis matrix Among them I m,c is an m×c dimensional matrix with all diagonal elements being 1; Calculate the projection matrix W = (XX T +ηD) -1 XE, updates the diagonal matrix D according to the projection matrix W and the cluster indication matrix E; Solving using KKT conditions Questions obtained i To update the adaptive similarity matrix, where a i is the i-th row element in the similarity matrix, s i is the i-th row element in the adaptive similarity matrix, h i The jth element is A vector of For the matrix (X T W+αFB+δZ) T Perform singular value decomposition to obtain its left eigenvector matrix V E , right eigenvector matrix U E ,calculate and Among them I n,c is an n×c dimensional matrix with diagonal elements of 1; Calculate the low-dimensional embedding matrix F = α(αI+γL S ) -1 EB T ; The value of the objective function is obtained according to the updated values ​​of the orthogonal basis matrix, the projection matrix, the similarity matrix, the clustering indication matrix, and the low-dimensional embedding matrix.

9. The image feature selection method according to claim 1, characterized in that: The determining whether the iterative update termination condition is satisfied according to the value of the objective function comprises: Determine whether the difference between the values ​​of the objective function obtained from two adjacent iterations is less than a set threshold; In response to the difference between the values ​​of the objective function obtained in two adjacent iterations being less than a set threshold, it is determined that the iterative update termination condition is met and the iterative update is stopped; otherwise, the iterative update is continued.

10. The image feature selection method according to claim 9, characterized in that: The determining whether the iterative update termination condition is satisfied according to the value of the objective function also includes: Determine whether the number of iterative updates reaches the set number; In response to the iterative update number reaching the set number, it is determined that the iterative update termination condition is met and the iterative update is stopped, otherwise the iterative update continues.

11. The image feature selection method according to claim 1, characterized in that: The selecting the optimal feature subset according to the current projection matrix comprises: Initialize the number of features to be selected, p; The L2 norms of the row vectors in the projection matrix are sorted, and the features corresponding to the first p largest row vectors are selected as the optimal feature subset.

12. The image feature selection method according to claim 1, characterized in that: Also includes: The image is reconstructed using the optimal feature subset.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

14. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Feature selection method based on flexible manifold embedding and structural diagram optimization

    CN111639685A

  • Non-supervision feature selection method and device based on spectrum relaxation embedding and medium

    CN117593598A