A data dimension reduction feature selection method based on swarm intelligence algorithm
By employing a data dimensionality reduction feature selection method based on swarm intelligence algorithms, and combining Shannon entropy, local density fluctuation index, and topology preservation evaluation features, and utilizing hybrid quantum rotation gates to update particle positions, the redundancy and omission problems of existing feature selection methods are solved, achieving efficient feature subset selection and dimensionality reduction.
Patent Information
- Application Number
- CN202511905530.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-12-17
AI Technical Summary
Existing feature selection methods rely on a single statistical indicator, which cannot take into account both the information representation ability of features and the sensitivity to local structure. This leads to the retention of redundant features or the omission of key features in multimodal or structurally complex data. Traditional swarm intelligence algorithms are difficult to adapt to manifold structures in high-dimensional feature spaces and are prone to getting trapped in local optima.
A data dimensionality reduction feature selection method based on swarm intelligence algorithm is adopted. A candidate feature set is constructed by calculating the weighted sum score of Shannon entropy and local density fluctuation index. The baseline persistent graph is generated by combining Vietoris-Rips complex, the topology preservation degree and fitness function are calculated, and the particle position is updated by using hybrid quantum rotation gate to generate the optimal feature subset.
It improves the accuracy and robustness of feature contribution evaluation, enhances the structural stability and interpretability after dimensionality reduction, avoids swarm intelligence algorithms getting trapped in local optima, and realizes the selection of the globally optimal feature subset in the high-dimensional feature space.
Smart Images

Figure CN121350547B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data analysis, and particularly relates to a data dimension reduction feature selection method based on a swarm intelligence algorithm. BACKGROUND
[0002] Multi-modal data has become an important resource source in current data mining and modeling processes, in order to extract effective information from redundant and high-dimensional samples, feature selection and dimension reduction technology has gradually become a key step in data mining, swarm intelligence algorithm is widely used in combined feature selection field due to parallel search, diversity preservation and strong cross-space jumping ability, the development of topology data analysis, graph structure modeling and nonlinear manifold dimension reduction makes the structural, connectivity and stability features of high-dimensional data more fully described.
[0003] However, the prior art still has deficiencies, the existing feature selection method only relies on a single statistical index for evaluation, and cannot take into account the information expression ability and local structure sensitivity of the features, resulting in the problem that redundant features are retained or key features are missed in multi-modal or complex structure data, the traditional swarm intelligence algorithm updates particles in the Euclidean space, and it is difficult to adapt to the manifold structure existing in the high-dimensional feature space, and the update strategy lacks cross-space jumping ability, and it is easy to fall into a local optimal solution and difficult to obtain a globally optimal feature subset. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a data dimension reduction feature selection method based on a swarm intelligence algorithm, which solves the problem that the existing feature selection method only relies on a single statistical index for evaluation, and cannot take into account the information expression ability and local structure sensitivity of the features, resulting in the problem that redundant features are retained or key features are missed in multi-modal or complex structure data, the traditional swarm intelligence algorithm updates particles in the Euclidean space, and it is difficult to adapt to the manifold structure existing in the high-dimensional feature space, and the update strategy lacks cross-space jumping ability, and it is easy to fall into a local optimal solution and difficult to obtain a globally optimal feature subset.
[0006] To solve the above technical problems, the present application provides the following technical scheme:
[0007] In a first aspect, the present application provides a data dimension reduction feature selection method based on a swarm intelligence algorithm, which includes,
[0008] Multi-modal data is collected and preprocessed to obtain a structured high-dimensional sample matrix, the structured high-dimensional sample matrix is screened to form a feature list, based on the feature list, the Shannon entropy and the local density fluctuation index of each feature are calculated, and the feature contribution degree score is obtained by weighted summation of the two, and a candidate feature matrix and a candidate feature set are constructed by screening;
[0009] The number of particles is set based on the candidate feature set, the initial binary code of each particle is generated to obtain a sub-feature matrix, a dependent distance matrix is constructed based on the candidate feature matrix and the sub-feature matrix, a reference persistent diagram and a sub-feature persistent diagram are generated using Vietoris-Rips complex, the overall difference degree and the overall deviation degree are calculated, and the topological preservation degree is mapped, and a fitness function is constructed.
[0010] An initial fitness set is obtained by traversing all particles to obtain a personal historical best position and a global historical best position, the initial binary code is mapped to a Grassmann manifold to generate an initial point position, a direction vector is obtained by a vector transfer operator, and the particle position is updated by combining a hybrid quantum rotation gate to generate a real value score vector, and an updated encoding vector is generated by a Sigmoid function, and the personal and global best are updated in combination with the fitness, and the optimal feature subset is output after the maximum iteration number is reached, an optimal feature matrix is constructed, and a low-dimensional representation matrix is obtained by dimensionality reduction.
[0011] As a preferred scheme of the data dimensionality reduction feature selection method based on swarm intelligence algorithm, wherein: the calculation of the overall difference degree and the overall deviation degree, the mapping of the topological preservation degree, and the construction of the fitness function include:
[0012] The index of the feature marked as selected in the binary code is extracted to generate a sub-feature matrix;
[0013] Based on the candidate feature matrix, the feature values of any two rows are screened, the dependent coefficient is calculated by the Pearson correlation coefficient formula, the dependent distance matrix is constructed, the scale parameter is set based on the empirical rule, the complex is constructed by the Vietoris-Rips complex construction method, and the reference persistent diagram is generated, and the above steps are repeated for the sub-feature matrix to obtain the sub-feature persistent diagram.
[0014] The Betti number of the complex is calculated by the persistent homology analysis method, the overall difference degree is obtained by the discrete integral form, the difference between the reference persistent diagram and the feature subset persistent diagram is calculated, and the overall deviation degree is obtained by the discrete two norm.
[0015] The topological distortion degree is obtained by weighted summation based on the overall deviation degree and the overall difference degree, the topological distortion degree is mapped to the topological preservation degree, and the fitness function is defined.
[0016] As a preferred scheme of the data dimension reduction feature selection method based on swarm intelligence algorithm, the method comprises the following steps:
[0017] The fitness value of each particle is calculated by traversing all particles, the fitness values of all particles are obtained, the initial binary code is set as the personal historical best position, the fitness values are sorted in descending order, the personal historical best position corresponding to the maximum value is screened, and the global historical best position is set.
[0018] Based on the initial binary code, the initial point position of the particle on the Grassmann manifold is obtained through QR decomposition.
[0019] Based on the number of particles, a value selected randomly from a standard uniform distribution is set as the initial quantum amplitude parameter of the particle.
[0020] As a preferred scheme of the data dimension reduction feature selection method based on swarm intelligence algorithm, the method comprises the following steps:
[0021] The personal historical best position is summed and averaged to obtain the local guide point of each particle, the local guide point and the average optimal position are set as two points on the Riemann manifold, the logarithmic mapping vector from the average optimal position to the local guide point is calculated, the logarithmic mapping vector is transferred through a vector transfer operator to obtain the direction vector of each particle at the local guide point.
[0022] The initial quantum amplitude parameter is multiplied by the maximum rotation angle to obtain a rotation angle, a hybrid quantum rotation gate operator is constructed, and the rotation direction vector is obtained by multiplying the direction vector.
[0023] The modulus of the rotation direction vector is calculated to obtain a jump step, the updated position of the particle at iteration u+1 is generated, the projection matrix is used to convert the real value score vector, the binary feature selection code is generated, and the optimal feature subset is output through iterative optimization.
[0024] As a preferred scheme of the data dimension reduction feature selection method based on swarm intelligence algorithm, the method comprises the following steps:
[0025] Based on the optimal feature subset, the optimal feature matrix is constructed, and the low-dimensional representation matrix is obtained by using the dimension reduction method.
[0026] As a preferred scheme of the data dimension reduction feature selection method based on swarm intelligence algorithm, the method comprises the following steps of:
[0027] The multi-modal data is collected through an API interface, and the multi-modal data is preprocessed, including aligning the multi-modal data through a timestamp, filling in missing values through linear interpolation, and performing dimension normalization to obtain preprocessed multi-modal data, and a structured high-dimensional sample matrix is constructed.
[0028] As a preferred scheme of the data dimension reduction feature selection method based on swarm intelligence algorithm, the method comprises the following steps of:
[0029] Based on the structured high-dimensional sample matrix, the number of missing features is extracted, the missing rate, variance and numerical range are calculated, and the feature list is obtained through screening.
[0030] As a preferred scheme of the data dimension reduction feature selection method based on swarm intelligence algorithm, the method comprises the following steps of:
[0031] Based on the feature list, the Shannon entropy is calculated through the Shannon entropy formula, the local density fluctuation index is calculated through the Laplace score method, the Shannon entropy and the local density index are weighted and summed to obtain the feature contribution score, the feature contribution score is sorted in descending order, the first K feature values are screened, and the candidate feature matrix and the candidate feature set are obtained.
[0032] In a second aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program is executed by the processor to implement any step of the data dimension reduction feature selection method based on swarm intelligence algorithm according to the first aspect of the present application.
[0033] In a third aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement any step of the data dimension reduction feature selection method based on swarm intelligence algorithm according to the first aspect of the present application.
[0034] The application has the advantages that: the application generates an initial point position by mapping an initial binary code to a Grassmann manifold, obtains a direction vector through a vector transfer operator, updates a particle position in combination with a hybrid quantum rotation gate, generates a real value score vector, generates an updated code vector through a Sigmoid function, and updates a personal and global optimum in combination with fitness, so as to output an optimal feature subset after a maximum iteration number; the accuracy and robustness of feature contribution degree evaluation are improved, the structural stability and interpretability after dimension reduction are improved, and a swarm intelligence algorithm is prevented from falling into a local optimum. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0036] Figure 1 The flowchart of the data dimension reduction feature selection method based on the swarm intelligence algorithm in embodiment 1.
[0037] Figure 2 The schematic diagram of the hybrid quantum rotation gate update strategy of the data dimension reduction feature selection method based on the swarm intelligence algorithm in embodiment 1. DETAILED DESCRIPTION
[0038] In order to make the above-mentioned purposes, features and advantages of the application more obvious and easy to understand, the specific embodiments of the application will be described in detail in combination with the drawings in the specification.
[0039] In the following description, many specific details are set forth in order to provide a thorough understanding of the application, but the application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the application, therefore the application is not limited to the specific embodiments disclosed below.
[0040] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or selective embodiment that excludes other embodiments.
[0041] Embodiment 1, refer to Figure 1 and Figure 2 , the first embodiment of the application provides a data dimension reduction feature selection method based on a swarm intelligence algorithm, including the following steps:
[0042] S1, collect multi-modal data and pre-process to obtain a structured high-dimensional sample matrix, screen the structured high-dimensional sample matrix to form a feature list, calculate Shannon entropy and local density fluctuation index for each feature based on the feature list, and obtain a feature contribution score by weighted sum of the two, and construct a candidate feature matrix and a candidate feature set by screening;
[0043] Specifically, multi-modal data is collected and pre-processed to obtain a structured high-dimensional sample matrix, including:
[0044] Multi-modal data is collected through an API interface, such as sensor data, business logs (converted to vectors by a BERT model), user behavior text (converted to vectors by a BERT model), and images (feature vectors extracted by a CNN model).
[0045] The multi-modal data is pre-processed, including aligning the multi-modal data by timestamp, filling in missing values by linear interpolation, and performing dimension normalization to obtain pre-processed multi-modal data. The pre-processed multi-modal data collected at each time point (i.e., samples) is set as rows (each row represents a specific pre-processed multi-modal data, such as sensor data), and each feature of the pre-processed multi-modal data is set as a column (each column represents a specific feature in the pre-processed multi-modal data, such as power in sensor data), to construct a structured high-dimensional sample matrix.
[0046] Through the API interface, multi-modal data is collected and standardized pre-processed to construct a structured high-dimensional sample matrix, achieving unified expression and time sequence alignment of heterogeneous information sources. By fusing semantic conversion models and deep feature extraction frameworks, business logs and user behavior text are converted into semantic vectors, while high-order spatial features in image information and continuous physical quantity features in sensors are extracted, thereby constructing a unified format of high-dimensional data expression. Combined with a timestamp-based synchronization mechanism and a missing value linear interpolation strategy, the matching accuracy and data continuity between multi-source data are greatly improved. Dimension normalization ensures that different modal features are processed on the same scale in subsequent calculations, effectively suppressing model instability problems caused by feature bias. The structured high-dimensional sample matrix not only has good data consistency, but also has strong inputability and wide adaptation range, laying a high-quality data foundation for subsequent feature screening and dimension reduction.
[0047] Further, the structured high-dimensional sample matrix is screened to form a feature list, including:
[0048] Based on the structured high-dimensional sample matrix, the number of missing features is extracted, the ratio of the number of missing features to the number of features is calculated, the missing rate is obtained, the variance of the features is calculated through the covariance formula, and the difference between the maximum and minimum values of each feature (after sorting in descending order of feature value) is calculated to obtain the numerical range.
[0049] Based on the empirical rule, the threshold values of the missing rate and the variance are set respectively, the features with missing rate greater than the missing rate threshold value or variance smaller than the variance threshold value or numerical range of 0 are screened out, the columns corresponding to the screened features in the structured high-dimensional matrix are deleted to obtain a filtered matrix, and the features in the filtered matrix are arranged horizontally to obtain a feature list.
[0050] By extracting the number of missing features and the variance value of each feature, setting double threshold values for screening, and assisting with the difference between the maximum and minimum values of the features, a rigorous data validity detection process is constructed. This mechanism can greatly compress the feature dimension on the basis of ensuring information retention rate, eliminate noise or constant value features, and avoid the interference of redundant dimensions on the subsequent learning process. This screening method does not depend on any model assumption and has good universality and migratability, providing a unified preprocessing paradigm for feature selection in multi-task scenarios.
[0051] Further, the weighted sum of the two is obtained to obtain a feature contribution score, and a candidate feature matrix and a candidate feature set are constructed by screening, including:
[0052] Based on the feature list, the Shannon entropy of each feature in the feature list is calculated by the Shannon entropy formula, the local density fluctuation index is calculated by the Laplace score method, the weighted sum of the Shannon entropy and the local density index is obtained to obtain the feature contribution score, the feature contribution score is sorted in descending order, the top K feature values are selected, and the top K feature columns corresponding to the top K features are extracted from the feature list. The corresponding row in the feature list is combined to obtain a candidate feature matrix, and the top K features are stacked horizontally to obtain a candidate feature set.
[0053] The use of the Laplace score method to calculate the local fluctuation index includes constructing an adjacency matrix based on the structured high-dimensional sample matrix by the k-nearest neighbor graph construction method, calculating the degree matrix by the degree matrix calculation formula, calculating the difference between the degree matrix and the adjacency matrix to obtain the Laplace matrix, and calculating the local fluctuation index using the Laplace score method on the Laplace matrix.
[0054] By constructing a joint scoring mechanism of Shannon entropy and Laplace score, the contribution of each feature to global information representation and local structure fidelity is scientifically quantified. Based on this, a set of candidate features with strong representativeness and stable structure is selected. The combination of data complexity measured by information entropy and local density perturbation characterized by Laplace score achieves feature optimization evaluation in both global and local dimensions. Shannon entropy reflects the information richness of feature distribution and prioritizes the retention of dimensions with higher uncertainty, while Laplace score effectively captures the sensitivity of features and structural perturbation trends in manifold structure through k-nearest neighbor graph construction and graph Laplace matrix analysis. The feature contribution score formed by the weighted fusion of the two can significantly improve the discriminativeness and stability of feature evaluation. The final candidate feature set has good discriminative ability and structural expressiveness, providing a high-quality initial feature subset for subsequent topology preservation analysis and particle swarm optimization. It shows significant advantages in model lightweighting, structural stability and feature interpretability.
[0055] S2. Based on the candidate feature set, set the number of particles, generate the initial binary code of each particle and obtain the sub-feature matrix. Based on the candidate feature matrix and the sub-feature matrix, construct the dependency distance matrix. Use the Vietoris-Rips complex to generate the baseline persistent graph and the sub-feature persistent graph, calculate the overall dissimilarity and the overall deviation, map them to the topology preservation degree, and construct the fitness function.
[0056] Specifically, the overall dissimilarity and overall deviation are calculated, mapped to topology preservation, and a fitness function is constructed, including:
[0057] The number of particles and the maximum number of iterations are set using empirical rules. For example, if there are K candidate features in the candidate feature set, then the number of particles is 30 ≤ K ≤ 100. The initial binary code for each particle is obtained using the following formula:
[0058] ;
[0059] ;
[0060] in, For the first The initial state of each particle. and For the first The particle pair The candidate features and the first Initial selection flags for candidate features (1 for selected and 0 for unselected). For the first The particle pair A random number of candidate features;
[0061] The index of the feature marked as selected in the binary code is extracted to generate a sub-feature matrix, and the formula is:
[0062] ;
[0063] wherein, is the sub-feature matrix, is the initialized binary code selected feature index set, is the candidate feature matrix;
[0064] Based on the candidate feature matrix, the feature values of any two rows are screened, the dependence coefficient is calculated by the Pearson correlation coefficient formula, converted into distance, and a dependence distance matrix is constructed, and the formula is:
[0065] ;
[0066] ;
[0067] wherein, is the distance, is any two rows, is the dependence coefficient, is the dependence distance matrix, is the number of rows;
[0068] Based on the empirical rule, a set of scale parameters is set, including K consecutive scale parameters, combined with the dependence distance matrix, a complex is constructed by the Vietoris-Rips complex construction method, a benchmark persistent graph is generated, and the above steps are repeated for the sub-feature matrix to obtain a sub-feature persistent graph;
[0069] The Betti number is calculated by the persistent homology analysis method for the complex, and the overall difference degree is obtained by the discrete integral form, and the formula is:
[0070] ;
[0071] wherein, is the overall difference degree, is the Betti curve of the dimension (obtained by using the Betti curve generation method for the Betti number), is the difference (absolute value) between the benchmark Betti number (obtained based on the candidate matrix) and the Betti number of the dimension, is the number of scale parameters, is the ratio of the difference between the maximum scale parameter and the minimum scale parameter to the scale number-1, is the scale parameter;
[0072] The difference of the reference persistent graph and the feature subset persistent graph of each sampling point is calculated, and the overall deviation degree is obtained by discrete two norm, and the formula is:
[0073] ;
[0074] Wherein, is the i th sampling point, is the difference of the reference persistent graph and the feature subset persistent graph in the i th dimension, is the step size, is the overall deviation degree in the i th dimension; ;
[0075] The sampling points refer to the birth and death times extracted from the reference persistent graph and the feature subset persistent graph, the birth and death times are sorted in descending order respectively, the maximum value and the minimum value are screened, the definition domain boundary (the interval of the maximum value and the minimum value of the birth and death time) is generated, A equidistant sampling points are constructed in the definition domain boundary, and the ratio of the difference between the maximum value and the minimum value to S-1 is calculated to obtain the step size;
[0076] The overall deviation degree and the overall difference degree are weighted and summed to obtain the topological distortion degree, and the topological distortion degree is mapped to the topological preservation degree, and the formula is:
[0077] ;
[0078] Wherein, is the topological distortion degree, is the topological preservation degree;
[0079] The topological preservation degree is normalized, and the fitness function is defined, and the formula is:
[0080] ;
[0081] Wherein, is the fitness function value, is the penalty coefficient, is the feature number penalty term, which represents the ratio of the selected feature number and the candidate feature number.
[0082] The disjoint problem between the traditional feature selection method and the data topology structure is effectively bridged by constructing a topology preservation degree and defining a fitness function, the structure deviation of the feature subset on the multi-scale persistent homology feature is quantified as a topology distortion degree by calculating the overall difference degree and the overall deviation degree, and the topology distortion degree is mapped as a topology preservation degree as a fitness index, the influence of different feature combinations on the sample structure fidelity can be dynamically evaluated in the optimization process, and the composite fitness function established after introducing the feature number penalty term takes into account the compactness and topology preservation ability of the feature subset, greatly improves the balance between maintaining the global structure consistency and reducing the model complexity of the finally selected features, and the quantitative index mechanism of introducing the structure fidelity provides a new feature selection evaluation perspective for the data modeling of multi-modal high-dimensional samples, and has strong universality and expansibility.
[0083] S3, traverse all particles to obtain an initial fitness set, obtain a personal historical best position and a global historical best position, map the initialization binary code to a Grassmann manifold to generate an initial point position, obtain a direction vector through a vector transfer operator, update the particle position by combining a hybrid quantum rotation gate to generate a real value score vector, generate an updated code vector through a Sigmoid function, update the personal and global best in combination with the fitness, output the optimal feature subset after a maximum iteration number is reached, construct an optimal feature matrix, and obtain a low-dimensional representation matrix through a dimension reduction method;
[0084] Specifically, the initial fitness set is obtained by traversing all particles, and the personal historical best position and the global historical best position are obtained, including:
[0085] All particles are traversed, the fitness value of each particle is calculated, and the fitness values of all particles are obtained, and the initial fitness set is obtained by transverse arrangement;
[0086] For each particle, the initialization binary code is set as the personal historical best position, all particles are traversed, and all personal historical best positions are obtained;
[0087] The fitness values in the initial fitness set are sorted in descending order, the personal historical best position corresponding to the maximum value is selected, and the global historical best position is set;
[0088] Based on the initialization binary code, each code in the initialization binary code is normalized to construct a U*C matrix, C is the corresponding feature, and U is the candidate feature, the column orthogonal matrix is obtained by QR decomposition of the matrix, and the subspace spanned by the columns in the column orthogonal matrix is the initial point position of the particle on the Grassmann manifold, all codes are traversed to obtain the initial point positions of all codes;
[0089] Based on the number of particles, by randomly selecting a value in the standard uniform distribution, set the initial quantum amplitude parameter of the particle, traverse all particles, get the initial quantum amplitude parameter of all particles.
[0090] The search space state of multiple particles is initialized by the swarm intelligence mechanism to establish the basis of global exploration ability for feature subset distribution. Through structural mapping of the initial binary code of each particle, the subspace position corresponding to the code is converted into a point position representation on the Grassmann manifold by QR decomposition, effectively breaking the limitation of traditional particle swarm optimization in Euclidean space search. The initial evaluation of each particle not only depends on the dimensionality compression of its code itself, but also is affected by its initial performance in topological preservation. The initial quantum amplitude parameter of the particle establishes a probability basis for the jumping behavior in the subsequent iteration process, so that the entire particle swarm has the triple initialization advantages of multi-center heuristic jumping + geometric topology perception + global jumping distribution, thereby significantly widening the search space coverage range in the initial stage, reducing the probability of falling into local optimum, and improving the adaptive exploration ability in high-dimensional feature space.
[0091] Further, the individual and global best are updated according to the fitness, and the optimal feature subset is output after a maximum number of iterations, including:
[0092] The personal historical best position is summed and averaged to obtain the average optimal position of the u-th iteration, and the personal historical best position is weighted and summed to obtain the local guide point of each particle;
[0093] The local guide point and the average optimal position are set as two points on the Riemann manifold, and the logarithmic mapping vector from the average optimal position to the local guide point is calculated, and the formula is:
[0094] ;
[0095] Wherein, is the direction vector of particle at time , that is, the logarithmic mapping vector, is the local guide point of particle , is the initial point position of particle ;
[0096] The logarithmic mapping vector is transferred by the vector transfer operator to obtain the direction vector of each particle at the local guide point, and the formula is:
[0097] ;
[0098] Wherein, is the direction vector of particle directional vector, This is a vector transfer operator (Parallel Transport).
[0099] The initial quantum magnitude parameter is multiplied by the maximum rotation angle (set based on a fixed maximum rotation angle strategy) to obtain the rotation angle, and a hybrid quantum rotation gate operator is constructed, with the following formula:
[0100] ;
[0101] in, For hybrid quantum rotation gate operators, The imaginary unit, To generate operators, and to transpose the annihilation operator. Let be the annihilation operator, and let represent a U*U matrix where U is the candidate feature. For particles rotation angle, Unit direction vector (The ratio of the expected Euclidean norm of the direction vector) and the Pauli matrix vector The inner product, For Kronecker product;
[0102] Multiply the hybrid quantum rotation gate operator and the direction vector to obtain the rotation direction vector;
[0103] Calculate the magnitude of the rotation direction vector to obtain the jump step size, using the following formula:
[0104] ;
[0105] ;
[0106] in, For particles The length of the mold, For particles The rotation direction vector, For particles The jump stride length, For particles The random perturbation factor;
[0107] Normalize the rotation direction vector to obtain the unit direction vector, generate the updated position of the particle in iteration u+1, and convert it into a real-valued score vector using the projection matrix, as shown in the formula:
[0108] ;
[0109] ;
[0110] ;
[0111] wherein, is the time particle updated position of the particle, is the unit direction vector of the particle is the Euclidean vector of the particle is the transpose, is the real-valued score vector of the particle to the first candidate feature;
[0112] The real-valued score vector is mapped to a selection probability by a Sigmoid function to generate a binary feature selection code, including setting a feature threshold based on a fixed threshold method, screening the selection probability greater than the feature threshold, setting to 1, otherwise 0, to obtain the binary feature selection code;
[0113] The binary feature selection code is spliced to obtain an updated encoding vector, the fitness value of the updated encoding vector is calculated, if the fitness value of the updated encoding vector is greater than the fitness value of the personal historical best position, the personal historical best position is replaced by the corresponding position of the updated encoding vector, and the global optimal position is updated, until the maximum iteration number is reached, and the optimal feature subset is output.
[0114] By combining manifold geometry and quantum search strategy, the particles are guided to jump to a better structure for updating, which significantly improves the convergence efficiency and global optimal probability. The stable migration of particles from the current state to the direction of the local guide point is realized by using the logarithmic mapping and parallel moving operator on the Riemannian manifold, so that the optimization process not only has directionality, but also reflects geometric differentiability. Then the mixed quantum rotation gate is introduced to construct the jumping direction of the particles, and the jumping step and rotation amplitude are calculated by the composite operator, which gives each particle the ability to quickly escape from the local trap in a complex search space. The updated position of the particle is mapped to a continuous score vector through a projection matrix, and a discrete selection probability is generated by combining a Sigmoid function, so as to complete the closed-loop action of real-valued score→probability mapping→binary re-encoding. While ensuring the search accuracy, the dynamic linkage iteration of the encoding space and the geometric space is realized, which can maintain continuous optimizability in high-dimensional discrete feature selection tasks and significantly improve the structural fitness of the final feature subset, especially suitable for application scenarios where data has complex nonlinear distribution.
[0115] Further, an optimal feature matrix is constructed, and a low-dimensional representation matrix is obtained by dimension reduction method, including:
[0116] Based on the feature index of the optimal feature subset, the corresponding columns in the candidate feature matrix are extracted, the features in the optimal feature subset are set as rows, and an optimal feature matrix is obtained.
[0117] The optimal feature matrix is dimensionally reduced using a dimension reduction method, such as PCA (Principal Component Analysis), Isomap (Isometric Mapping), LLE (Locally Linear Embedding), and an autoencoder, to obtain a low-dimensional representation matrix.
[0118] By mapping the optimal feature subset to the optimal feature matrix and combining the dimension reduction strategies of PCA, Isomap, LLE, and autoencoder for embedding processing, the dimensionality of the representation space can be further compressed while maximizing the discriminability and separability of the original features in the local embedding structure. This not only enhances the visualization ability of the feature subset, but also serves as a high-quality input for subsequent supervised learning tasks, achieving the dual goals of data dimension compression and model performance improvement. This ensures the best balance between feature information retention and low-dimensional expression, and is particularly suitable for feature sparsity and expression power requirements in practical engineering applications with sample dimension redundancy, multi-modal heterogeneity, and complex structure.
[0119] The embodiment also provides a computer device suitable for the data dimension reduction feature selection method based on the swarm intelligence algorithm, which comprises a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the data dimension reduction feature selection method based on the swarm intelligence algorithm proposed in the above embodiment.
[0120] The computer device can be a terminal, which comprises a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, operator network, NFC (Near Field Communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device. It can also be an external keyboard, touchpad or mouse, etc.
[0121] The embodiment also provides a storage medium on which a computer program is stored, the program being executed by a processor to implement the data dimension reduction feature selection method based on swarm intelligence algorithm proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.
[0122] To sum up, the application generates an initial point position by mapping an initial binary code to a Grassmann manifold, obtains a direction vector through a vector transfer operator, updates a particle position by combining a hybrid quantum rotation gate, generates a real value score vector, generates an updated code vector through a Sigmoid function, updates a personal and global optimum by combining fitness, and outputs an optimal feature subset after a maximum iteration number is reached; the precision and robustness of feature contribution degree evaluation are improved, the structural stability and interpretability after dimension reduction are improved, and the swarm intelligence algorithm is prevented from falling into a local optimum.
[0123] It should be noted that the above embodiments are only used to illustrate the technical solutions of the application rather than limit the application, and although the application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the application, and all should be covered in the scope of the claims of the application.
Claims
1. A swarm intelligence algorithm based data dimension reduction feature selection method, characterized in that: The application relates to a feature selection method based on Grassmann manifold and quantum particle swarm optimization. The application comprises the following steps: collecting multi-modal data and pre-processing the multi-modal data to obtain a structured high-dimensional sample matrix, screening the structured high-dimensional sample matrix to form a feature list, calculating Shannon entropy and local density fluctuation index for each feature based on the feature list, performing weighted summation on the two to obtain a feature contribution score, and constructing a candidate feature matrix and a candidate feature set through screening; Based on the candidate feature set, the number of particles is set, the initial binary code of each particle is generated, and a sub-feature matrix is obtained, a dependent distance matrix is constructed based on the candidate feature matrix and the sub-feature matrix, a benchmark persistent graph and a sub-feature persistent graph are generated using Vietoris-Rips complex, the overall difference degree and the overall deviation degree are calculated, the topological preservation degree is mapped, and a fitness function is constructed; The initial fitness set is obtained by traversing all particles, the personal historical best position and the global historical best position are obtained, the initial binary code is mapped to the Grassmann manifold to generate the initial point position, the direction vector is obtained through the vector transfer operator, the particle position is updated by combining the hybrid quantum rotation gate to generate the real value score vector, the update code vector is generated through the Sigmoid function, and the personal and global best are updated by combining the fitness, and the optimal feature subset is output after the maximum iteration number is reached, the optimal feature matrix is constructed, and the low-dimensional representation matrix is obtained through the dimension reduction method.
2. The swarm intelligence algorithm based data dimension reduction feature selection method of claim 1, wherein: The calculation of the overall difference degree and the overall deviation degree, the mapping of the topological preservation degree, and the construction of the fitness function comprise the following steps: Extract the index of the feature marked as selected in the binary code to generate a sub-feature matrix; Based on the candidate feature matrix, the feature values of any two rows are screened, the dependent coefficient is calculated through the Pearson correlation coefficient formula, the dependent distance matrix is constructed, the scale parameter is set based on an empirical rule, the complex is constructed through the Vietoris-Rips complex construction method to generate the benchmark persistent graph, the above steps are repeated for the sub-feature matrix to obtain the sub-feature persistent graph; The Betti number is calculated for the complex through the persistent homology analysis method, the overall difference degree is obtained through the discrete integral form, the difference between the benchmark persistent graph and the feature subset persistent graph is calculated, and the overall deviation degree is obtained through the discrete two norm; The topological distortion degree is obtained by performing weighted summation based on the overall deviation degree and the overall difference degree, the topological distortion degree is mapped to the topological preservation degree, and the fitness function is defined.
3. The swarm intelligence algorithm based data dimension reduction feature selection method of claim 2, wherein: The initial fitness set is obtained by traversing all particles, the personal historical best position and the global historical best position are obtained, which comprises the following steps: Traverse all particles, calculate the fitness value of each particle, obtain the fitness values of all particles, set the initial binary code as the personal historical best position, sort the fitness values in descending order, select the personal historical best position corresponding to the maximum value as the global historical best position; Based on the initial binary code, the initial point position of the particle on the Grassmann manifold is obtained through QR decomposition; Based on the number of particles, a number value in a standard uniform distribution is randomly selected and set as the initial quantum amplitude parameter of the particle.
4. The swarm intelligence algorithm based data dimension reduction feature selection method of claim 3, wherein: The personal and global best are updated by combining the fitness, and the optimal feature subset is output after the maximum iteration number is reached, which comprises the following steps: Summing and averaging the best positions of the personal history to obtain the local guide point of each particle, setting the local guide point and the average optimal position as two points on the Riemann manifold, calculating the logarithmic mapping vector from the average optimal position to the local guide point, and transferring the logarithmic mapping vector through a vector transfer operator to obtain the direction vector of each particle at the local guide point; The initial quantum amplitude parameter is multiplied by the maximum rotation angle to obtain a rotation angle, a hybrid quantum rotation gate operator is constructed, and the direction vector is multiplied to obtain a rotation direction vector; The modulus of the rotation direction vector is calculated to obtain a jump step, and the updated position of the particle at iteration u+1 is generated, which is converted into a real-valued score vector using a projection matrix to generate a binary feature selection code, and the optimal feature subset is output through iterative optimization.
5. The swarm intelligence algorithm based data dimension reduction feature selection method of claim 4, wherein: The optimal feature matrix is constructed, and a low-dimensional representation matrix is obtained by dimension reduction method, including: Based on the optimal feature subset, an optimal feature matrix is constructed, and dimension reduction is performed on the optimal feature matrix using a dimension reduction method to obtain a low-dimensional representation matrix.
6. The swarm intelligence algorithm based data dimension reduction feature selection method of claim 5, wherein: The structured high-dimensional sample matrix is obtained by collecting and preprocessing multi-modal data, including: Multi-modal data is collected through an API interface, and the multi-modal data is preprocessed, including aligning the multi-modal data by timestamp, filling in missing values by linear interpolation, and performing dimension normalization to obtain preprocessed multi-modal data, and constructing a structured high-dimensional sample matrix.
7. The swarm intelligence algorithm based data dimension reduction feature selection method of claim 6, wherein: The structured high-dimensional sample matrix is screened to form a feature list, including: Based on the structured high-dimensional sample matrix, the number of missing features is extracted, the missing rate, variance and numerical range are calculated, and the feature list is obtained through screening.
8. The swarm intelligence algorithm based data dimension reduction feature selection method of claim 7, wherein: The feature contribution score is obtained by weighted sum of the two, and the candidate feature matrix and candidate feature set are constructed through screening, including: Based on the feature list, the Shannon entropy is calculated by the Shannon entropy formula, the local density fluctuation index is calculated by the Laplace score method, the Shannon entropy and the local density index are weighted and summed to obtain the feature contribution score, the feature contribution score is sorted in descending order, the top K feature values are selected to obtain the candidate feature matrix and the candidate feature set. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is characterized in that: The processor executes the computer program to realize the steps of the data dimension reduction feature selection method based on swarm intelligence algorithm in any one of claims 1-7.
10. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program is executed by the processor to realize the steps of the data dimension reduction feature selection method based on swarm intelligence algorithm in any one of claims 1-7.
Citation Information
Patent Citations
Big data feature extraction and dimension reduction method based on topological data analysis
CN117540183A
Integrated feature selection method and product based on quantum computing and Bayesian optimization
CN121051422A