Data feature selection method and device, storage medium and terminal
By ranking and parallel processing of features in high-dimensional data based on their importance, combined with dynamic hyperparameter optimization, the problems of long computation time and high uncertainty in existing technologies are solved, achieving efficient and accurate feature selection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2025-12-01
- Publication Date
- 2026-04-17
AI Technical Summary
Existing feature selection techniques are computationally time-consuming and highly uncertain, making it difficult to efficiently handle redundant and irrelevant features in high-dimensional data, resulting in low data processing efficiency.
The first feature selection algorithm is used to rank the features by importance, generate a candidate feature set, and divide it into multiple feature subsets. The second feature selection algorithm is used for parallel processing and iterative optimization. Combined with multi-core computing resources, the hyperparameters are dynamically adjusted to improve search efficiency.
By quickly filtering redundant features, computational complexity is reduced, processing time is shortened, and the accuracy and robustness of feature selection are improved. This avoids the high cost of serial global search and enhances the efficiency of high-dimensional data processing.
Smart Images

Figure CN121880872A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of high-dimensional data processing, and in particular to a method, apparatus, storage medium, and terminal for selecting data features. Background Technology
[0002] With the development of information technology, various fields have generated massive amounts of high-dimensional data with numerous features, including a large number of irrelevant or redundant features, making data processing difficult. Most existing feature selection techniques are based on evolutionary computation, which has good global search capabilities and can screen out a set of features that are representative, but still suffer from problems such as long computation time and high uncertainty. Summary of the Invention
[0003] This application provides a data feature selection method, apparatus, storage medium, and terminal to solve the problems of long computation time and high uncertainty in existing feature selection technologies.
[0004] In a first aspect, embodiments of this application provide a data feature selection method, the method comprising: The first feature selection algorithm is used to sort the features in the original feature set by importance, and the features are then filtered based on the sorting results to generate a candidate feature set. The candidate feature set is divided into multiple feature subsets, and each feature subset is processed in parallel based on the second feature selection algorithm. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset. The target feature set of the original feature set is determined based on the processing results of each feature subset.
[0005] Secondly, embodiments of this application provide a data feature selection device, the device comprising: The first selection module is used to sort the features in the original feature set by importance based on the first feature selection algorithm, and to filter each feature based on the sorting result to generate a candidate feature set. The second selection module is used to divide the candidate feature set into multiple feature subsets, and to process each feature subset in parallel based on the second feature selection algorithm. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset. The result determination module is used to determine the target feature set of the original feature set based on the processing results of each feature subset.
[0006] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps of the method described above.
[0007] Fourthly, embodiments of this application provide a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is adapted to be loaded by the processor and to execute the steps of the above-described method.
[0008] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following: This application provides a feature selection method for data. Based on a first feature selection algorithm, the features in the original feature set are ranked by importance. Based on the ranking result, each feature is filtered to generate a candidate feature set. The candidate feature set is divided into multiple feature subsets. Based on a second feature selection algorithm, each feature subset is processed in parallel. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset. Based on the processing results of each feature subset, the target feature set of the original feature set is determined. First, the first feature selection algorithm evaluates and ranks the importance of features, quickly filtering out a large number of irrelevant or redundant features and compressing the high-dimensional original feature set into a smaller candidate feature set, thereby reducing the complexity and computational cost of subsequent processing. Next, by dividing the feature subsets and using the second feature selection algorithm for parallel processing, multi-core computing resources are fully utilized, shortening the processing time for large-scale high-dimensional datasets. Simultaneously, parallel iterative optimization of the feature trees corresponding to the feature subsets helps to search for optimal feature combinations more precisely in both local and global contexts, improving the accuracy and robustness of feature selection. Finally, the globally optimal target feature set is selected from multiple parallel results, ensuring the quality of the results while avoiding the high cost of serial global searches. Compared to the randomness of single evolutionary algorithms, this ensemble decision reduces performance fluctuations caused by initialization or local traps. In the method of this application, the first feature selection algorithm efficiently selects high-quality candidate features, and the parallel processing of the second feature selection algorithm improves the processing efficiency of high-dimensional data feature selection while also ensuring the optimization quality of feature subsets, effectively solving the problems of high computational cost and slow convergence of traditional single evolutionary algorithms in high-dimensional scenarios. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 An exemplary system architecture diagram of a data feature selection method provided in this application embodiment; Figure 2A flowchart illustrating a data feature selection method provided in an embodiment of this application; Figure 3 A flowchart illustrating a data feature selection method provided in an embodiment of this application; Figure 4 A flowchart illustrating a specific implementation of a data feature selection method provided in this application embodiment; Figure 5 A flowchart illustrating a data feature selection method provided in an embodiment of this application; Figure 6 A structural block diagram of a data feature selection device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation
[0011] To make the features and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0012] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0013] With the development of information technology, massive amounts of data with numerous characteristics—i.e., high-dimensional data—have been generated in various fields of production and daily life. However, not all features are necessary, as many are irrelevant or even redundant, making data processing difficult and reducing algorithm performance. Feature selection techniques aim to improve data processing efficiency and optimize algorithm performance by selecting a set of optimal features while eliminating irrelevant and redundant features. Current mainstream methods are based on evolutionary computation, which is widely used to solve feature selection problems due to its global search capability. Examples include evolutionary search algorithms with evolutionary crossover and mutation operators, metaheuristic algorithms based on gravity search, and algorithms inspired by natural phenomena such as butterfly, ant colony, bird flock, and forest evolution. These methods can select a subset of candidate features with good classification performance through random initialization and their global search capability, and finally select the best feature subset as the final feature set based on some evaluation metrics.
[0014] However, in data mining tasks, due to the enormous search space, for a dataset with n features, the total number of possible solutions can reach [number missing]. Therefore, the traditional exhaustive search method for selecting a set of optimal features has an exponential time complexity (O(n log n)). Faced with increasingly large high-dimensional datasets, the training process often requires a significant amount of time and yields poor results or even fails to produce any output. Furthermore, when evolutionary algorithms are applied to feature selection, random initialization is commonly used in the initialization phase. This method is inherently uncertain, yet the initialization phase has a significant impact on the effectiveness of feature selection. Inappropriate initialization can lead the algorithm into local optima, affecting the final quality of feature selection.
[0015] Therefore, this application provides a data feature selection method to solve the problems of long computation time and high uncertainty in existing feature selection technologies.
[0016] Please see Figure 1 , Figure 1 An exemplary system architecture diagram of a data feature selection method provided in an embodiment of this application.
[0017] like Figure 1As shown, the system architecture may include a terminal 101, a network 102, and a server 103. The network 102 serves as the medium for providing a communication link between the terminal 101 and the server 103. The network 102 may include various types of wired or wireless communication links, such as wired communication links including fiber optic cables, twisted-pair cables, or coaxial cables, and wireless communication links including Bluetooth communication links, Wireless-Fidelity (Wi-Fi) communication links, or microwave communication links, etc.
[0018] Terminal 101 can interact with server 103 via network 102 to receive messages from or send messages to server 103. Alternatively, terminal 101 can interact with server 103 via network 102 to receive messages or data sent to server 103 by other users. Terminal 101 can be hardware or software. When terminal 101 is hardware, it can be various electronic devices, including but not limited to tablet computers, laptops, and desktop computers. When terminal 101 is software, it can be installed in the aforementioned electronic devices and can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module; no specific limitation is made here.
[0019] In this embodiment, terminal 101 first sorts the features in the original feature set by importance based on a first feature selection algorithm, and then filters each feature based on the sorting result to generate a candidate feature set. Then, terminal 101 divides the candidate feature set into multiple feature subsets, and processes each feature subset in parallel based on a second feature selection algorithm. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset. Finally, terminal 101 determines the target feature set of the original feature set based on the processing results of each feature subset.
[0020] Server 103 can be a business server providing various services. It should be noted that server 103 can be hardware or software. When server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 103 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module; no specific limitations are made here.
[0021] Alternatively, the system architecture may not include server 103. In other words, server 103 may be an optional device in the embodiments of this specification. That is, the method provided in the embodiments of this specification can be applied to a system structure that only includes terminal 101. The embodiments of this application do not limit this.
[0022] It should be understood that Figure 1The number of terminals, networks, and servers shown is only illustrative; the number can be any number of terminals, networks, and servers depending on the implementation requirements.
[0023] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data feature selection method provided in an embodiment of this application. The execution entity in this embodiment can be a terminal performing data feature selection, a processor within the terminal performing the data feature selection method, or a data feature selection service within the terminal performing the data feature selection method. For ease of description, the following example uses a processor within the terminal as the execution entity to illustrate the specific execution process of the data feature selection method.
[0024] like Figure 2 As shown, data feature selection methods can include at least: S202. Based on the first feature selection algorithm, the features in the original feature set are ranked by importance, and the features are filtered based on the ranking results to generate a candidate feature set.
[0025] Optionally, different feature selection algorithms have their own unique advantages and applicable scenarios. For example, some algorithms may be better at handling linear relationships, while others are better at capturing nonlinear relationships. High-dimensional feature datasets often contain complex feature interactions and various types of relationships, and a single feature selection algorithm may not be able to fully capture the relationships between these features. If multiple algorithms can be combined, their complementarity can be fully utilized to improve the accuracy and robustness of feature selection. For example, the forest optimization algorithm has global search capabilities, but its performance is highly dependent on the quality of the initial population. A large portion of the decision trees randomly generated in the original high-dimensional space are invalid or low-quality, causing the algorithm to waste a lot of time exploring invalid regions in the early stages. In this case, it is necessary to preprocess the original high-dimensional feature dataset using other feature selection algorithms.
[0026] Furthermore, the search space for high-dimensional data is enormous, with many features being irrelevant or redundant, making traditional exhaustive search impractical in terms of time complexity. Therefore, to reduce computational complexity and improve processing efficiency, the method in this embodiment first uses a first feature selection algorithm to quantify the importance of each feature, quickly identifying features that contribute significantly to the task, thereby simplifying the feature space and reducing the number of features required for subsequent processing.
[0027] Optionally, an efficient first feature selection algorithm is first chosen. This algorithm has the ability to quantitatively evaluate feature importance, calculate a corresponding quantitative score for each feature in the original feature set based on its contribution to the task, and then globally rank all features accordingly. The ranking result reflects the relative importance of each feature; the higher the importance of a feature, the stronger its support for the task. First feature selection algorithms include, but are not limited to, methods based on statistical testing, model-based methods, or feature importance evaluation mechanisms built into machine learning models. In specific implementation, the choice of algorithm should be comprehensively considered based on factors such as the specific application scenario, data type, and computing resources.
[0028] Optionally, a filtering operation is performed based on the importance ranking of each feature. Specifically, all features are sorted in descending order according to the feature importance assessment results. A threshold is set or a fixed number of top features are selected as candidate features to ensure that while eliminating a large number of low-value features, the core feature subset with the greatest discriminative power for the task is retained. Through this step, the original feature set is simplified into a candidate feature set containing the most informative features, which not only significantly reduces the complexity of subsequent processing but also provides a high-quality input foundation for refined feature optimization.
[0029] S204. Divide the candidate feature set into multiple feature subsets, and process each feature subset in parallel based on the second feature selection algorithm. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset.
[0030] Optionally, after obtaining the candidate feature set generated by the first feature selection algorithm, in order to improve processing efficiency and adapt to high-dimensional data scale, the method of this embodiment performs a structured partitioning of the candidate feature set. Specifically, firstly, based on the number of candidate features, the correlation between features, and the availability of computing resources, the entire candidate feature set is split into several non-overlapping or partially overlapping feature subsets according to a preset partitioning strategy. The partitioning strategy can be based on a simple equal division principle (e.g., equal-width grouping, sliding window, or random block division), or it can be based on more complex partitioning according to the statistical characteristics or business logic between features.
[0031] Optionally, in high-dimensional data environments, the structure within feature subsets and the relationships between features are extremely complex. It is difficult to accurately identify feature combinations that truly contribute significantly to the task using only simple, one-time feature selection methods. Furthermore, each resulting feature subset possesses unique characteristics, which may include the degree of correlation between features and the distribution of feature contributions to the task. Algorithms with iterative optimization capabilities can dynamically adjust the search direction for the next round based on performance metrics obtained from each round of evaluation (such as classification accuracy and model complexity). Through multiple rounds of search and evaluation, the algorithm can repeatedly screen and optimize feature subsets. Each round of candidate feature combinations is measured by preset evaluation metrics, and only combinations with better performance can enter the next iteration. As iteration progresses, the algorithm continuously eliminates poorly performing feature combinations, retaining and further optimizing those with better performance.
[0032] Based on this, in this embodiment, for each partitioned feature subset, a second feature selection algorithm with iterative optimization capabilities is independently invoked. This algorithm takes the feature subset as input and performs multiple rounds of search and evaluation within its internal feature space. Each iteration generates several candidate feature combinations, and the performance of these combinations is measured using preset evaluation metrics. Based on the evaluation results, the algorithm dynamically adjusts the search direction for the next round, gradually approaching the better feature subset within that subset. This process is executed synchronously and independently in parallel on multiple feature subsets, fully utilizing the concurrent processing capabilities of multiple processors or computing nodes. Through this mechanism, the fine-grained search task, which was originally difficult to complete efficiently in the overall candidate feature space, is decomposed into multiple smaller, independently solvable sub-problems, which are simultaneously advanced using parallel computing resources, improving the overall processing speed.
[0033] S206. Determine the target feature set of the original feature set based on the processing results of each feature subset.
[0034] Optionally, after completing the parallel optimization processing of each feature subset, each subset outputs a locally optimized result obtained through iterative selection. These results represent the candidate solutions with better performance in their respective feature subspaces. To obtain the final target feature set for the entire original feature set, the method in this embodiment integrates and evaluates the local results returned by all subsets in a unified manner.
[0035] Specifically, a comprehensive evaluation strategy is employed to integrate and analyze these results. This strategy can be flexibly selected based on specific application scenarios and needs. For example, a weighted aggregation method can be used, assigning weights to the processing results of each subset and then weighting and aggregating the processing results of all subsets according to their weights to generate a comprehensive feature importance score list. Based on a preset feature quantity or performance threshold, features with higher scores are selected from this list as the target feature set. Furthermore, considering that the feature selection results of each feature subset are also a local optimum of the original feature set, to improve processing efficiency, the optimal solution can also be directly selected from multiple processing results as the target feature set.
[0036] In this embodiment of the application, a feature selection method for data is provided. The method involves ranking the features in the original feature set by importance based on a first feature selection algorithm, filtering each feature based on the ranking result, and generating a candidate feature set. The candidate feature set is then divided into multiple feature subsets, and each feature subset is processed in parallel based on a second feature selection algorithm. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset. The target feature set of the original feature set is determined based on the processing results of each feature subset. First, the first feature selection algorithm evaluates and ranks the importance of features, quickly filtering out a large number of irrelevant or redundant features and compressing the high-dimensional original feature set into a smaller candidate feature set, thereby reducing the complexity and computational cost of subsequent processing. Next, by dividing the feature subsets and using the second feature selection algorithm for parallel processing, multi-core computing resources are fully utilized, shortening the processing time for large-scale high-dimensional datasets. Simultaneously, parallel iterative optimization of the feature trees corresponding to the feature subsets helps to search for optimal feature combinations more precisely in both local and global contexts, improving the accuracy and robustness of feature selection. Finally, the globally optimal target feature set is selected from multiple parallel results, ensuring the quality of the results while avoiding the high cost of serial global searches. Compared to the randomness of single evolutionary algorithms, this ensemble decision reduces performance fluctuations caused by initialization or local traps. In the method of this application, the first feature selection algorithm efficiently selects high-quality candidate features, and the parallel processing of the second feature selection algorithm improves the processing efficiency of high-dimensional data feature selection while also ensuring the optimization quality of feature subsets, effectively solving the problems of high computational cost and slow convergence of traditional single evolutionary algorithms in high-dimensional scenarios.
[0037] Please see Figure 3 , Figure 3 This is a flowchart illustrating a data feature selection method provided in an embodiment of this application.
[0038] like Figure 3 As shown, data feature selection methods can include at least: S302. Search for features in the original feature set using the random forest algorithm to determine multiple features that meet the preset importance criteria; generate a candidate feature set.
[0039] Optionally, Figure 4 This is a flowchart illustrating a specific implementation of a data feature selection method provided in an embodiment of this application, as shown below. Figure 4 As shown, the original M-dimensional feature set is first sorted and filtered by feature importance based on the first feature selection algorithm to determine the N-dimensional candidate feature set (M>N).
[0040] Specifically, the random forest algorithm, as a commonly used feature importance evaluation method, can rank the importance of each feature and serve as an efficient parallel filtering feature selection method to quickly filter out a large number of redundant features. Based on this, the method in this embodiment uses the random forest algorithm as the first feature selection algorithm to calculate the importance of each feature and rank the features from high to low according to the calculated feature importance scores. On this basis, according to preset importance criteria (such as importance score thresholds, the top N most important features, etc.), multiple features that meet the criteria are selected from the ranked feature list to form a candidate feature set for subsequent feature selection processes.
[0041] S304. Use a sliding window of preset dimensions to scan the candidate feature set and generate multiple feature subsets.
[0042] Optionally, such as Figure 4 As shown, after obtaining the N-dimensional candidate feature set, the candidate feature set is divided into multiple feature subsets. Specifically, an H-dimensional (i.e., the number of features contained in each feature subset, N>H) sliding window is used to scan the candidate feature set. The initial position of the sliding window starts from the beginning of the candidate feature set, and the dimension is determined according to a preset value, but can also be adjusted according to actual needs and data characteristics. The sliding window slides sequentially along the feature dimension direction of the candidate feature set in a non-overlapping manner, covering a continuous feature interval each time. All features covered constitute an independent feature subset. This process is repeated until the entire candidate feature set is completely covered.
[0043] It should be noted that when the sliding window approaches the end of the candidate feature set, the window portion may extend beyond the set's boundaries. This can be addressed by padding with default values or truncating the window to ensure the integrity of each feature subset. Ultimately, the original candidate feature set is divided into... Each subset of features is non-overlapping and structurally regular, with each subset containing H features, which facilitates balanced load distribution among subsequent parallel processing units.
[0044] S306. The second feature selection algorithm is a parallel feature selection forest optimization algorithm. In the parallel feature selection forest optimization algorithm, feature trees corresponding to each feature subset are generated based on the importance of each feature in each feature subset, and each feature tree is iteratively processed by optimizing the hyperparameters of each feature tree.
[0045] Alternatively, while existing Feature Selection Forest Optimization Algorithm (FSFOA) possesses global search capabilities, it is essentially a single-threaded iterative framework where all decision trees are updated sequentially. When dealing with large-scale, high-dimensional datasets, its training process is often costly and time-consuming, failing to leverage the parallel computing advantages of multi-core processors or distributed clusters. Furthermore, FSFOA typically employs random tree generation during the initialization phase, a method inherently fraught with uncertainty, and the quality of initialization significantly impacts subsequent search performance, easily leading to decreased accuracy in later selections. In addition, FSFOA usually relies on manually preset fixed hyperparameters, unable to dynamically adjust hyperparameters based on the actual performance of the decision trees, resulting in a rigid search process prone to getting trapped in local optima or premature convergence.
[0046] Based on this, such as Figure 4 As shown, when processing each feature subset in parallel, the method in this embodiment employs the Parallel Feature Selection Forest Optimization Algorithm (PFSFOA). Specifically, after dividing the candidate feature set into multiple feature subsets, a PFSFOA processing unit is independently configured for each feature subset. In each processing unit, an initial feature tree is first constructed based on the importance information of each feature in the subset, and initial hyperparameters are set for each feature tree. The feature tree generation process follows the basic principle of the forest optimization algorithm, that is, by selecting important features as the splitting nodes of the tree, a tree structure that reflects the hierarchical structure and importance between features is constructed.
[0047] Furthermore, utilizing parallel computing resources, PFSFOA simultaneously performs multiple rounds of iterative optimization on the feature trees corresponding to multiple feature subsets. In each iteration, the algorithm not only evaluates the performance of the current feature tree based on the preset optimization objective, but also dynamically adjusts relevant hyperparameters according to the evolutionary state of the feature tree. This allows high-performing feature trees to have more opportunities to reproduce, while poorly performing individuals are gradually eliminated. When the termination condition is met (such as reaching the maximum number of iterations, or the performance improvement of the feature tree being less than a preset threshold), the iteration process stops, and the current best feature tree is output as the feature selection result for that feature subset. Through this mechanism, PFSFOA continuously explores better feature combinations within each feature subset, gradually converging to a high-quality solution in that local space. Since each feature subset is independent, all PFSFOA processing units can run synchronously and in parallel, improving overall optimization efficiency.
[0048] S308. Determine the target feature set of the original feature set based on the processing results of each feature subset.
[0049] Optionally, for details regarding step S308, please refer to the description in step S206, which will not be repeated here.
[0050] This application provides a data feature selection method that employs an improved parallel feature selection forest optimization algorithm to process each feature subset in parallel. It combines feature importance to generate a feature tree and iteratively optimizes its hyperparameters, avoiding the inefficiency and instability caused by traditional random initialization and fixed parameters, thus improving the feature selection efficiency of large-scale high-dimensional datasets. The random forest algorithm is used to evaluate and filter the importance of the original high-dimensional features, efficiently and stably removing redundant or irrelevant features. This reduces data dimensionality while generating a high-quality candidate feature set, thereby improving the accuracy and training efficiency of subsequent feature selection. A sliding window with a preset dimension is used to scan the candidate feature set and divide it into multiple feature subsets, achieving reasonable partitioning of the feature space and laying the foundation for parallel processing. This provides independent sub-task units for subsequent parallel computing, effectively improving the efficiency and scalability of large-scale data feature selection.
[0051] Please see Figure 5 , Figure 5 This is a flowchart illustrating a data feature selection method provided in an embodiment of this application.
[0052] like Figure 5 As shown, data feature selection methods can include at least: S502. Based on the first feature selection algorithm, the features in the original feature set are ranked by importance, and the features are filtered based on the ranking results to generate a candidate feature set.
[0053] Optionally, for details regarding step S502, please refer to the description in step S202, which will not be repeated here.
[0054] S504. Divide the candidate feature set into multiple feature subsets. The second feature selection algorithm is a parallel feature selection forest optimization algorithm. In the parallel feature selection forest optimization algorithm, the importance of each feature in each feature subset is determined by the Gini coefficient, and the feature tree corresponding to each feature subset is generated based on the importance of each feature.
[0055] Optionally, the candidate feature set is first divided into multiple feature subsets. For details, please refer to the detailed description in step S204, which will not be repeated here.
[0056] Optionally, when generating feature trees for each feature subset using the second feature selection algorithm, the importance of features is quantified using an initialization method based on the Gini coefficient, and feature trees with heuristic information are constructed accordingly. Specifically, after dividing the candidate feature set into multiple feature subsets, for each feature subset, the Gini coefficient of each feature is calculated based on the features contained in the subset and their corresponding data samples. The Gini coefficient is an indicator of data purity; the smaller the value, the higher the class purity of the subset obtained after using the feature for partitioning, that is, the stronger the discriminative power of the feature for the task.
[0057] Furthermore, all features in the current feature subset are ranked according to the calculated Gini coefficients. Features with smaller Gini coefficients rank higher, indicating greater importance. Based on this, an initial feature tree is generated. This method ensures that each feature subset generates an initial feature tree with heuristic information, providing a good starting point for subsequent iterative optimization processes.
[0058] S506. Calculate the hyperparameters of each feature tree based on its age hyperparameter, and iterate through each feature tree using its hyperparameters.
[0059] Optionally, some feature trees may be generated in relatively poor condition, potentially leading to their elimination from the forest at a young age (i.e., fewer survivals or iterations). However, other feature trees, due to their relatively better feature variable sets, can survive in the forest for a relatively long time until they reach their lifespan limit and are then placed into the candidate population. Therefore, there is a significant difference in the age of trees within the candidate population. Since older feature trees typically have better feature variable sets than younger ones, the method in this embodiment introduces age as a core evolutionary state variable, dynamically calculating the hyperparameters of the feature trees and performing iterative optimization accordingly.
[0060] Specifically, during the execution of PFSFOA, each feature tree is assigned an age hyperparameter, Age, to record the number of iterations it has survived in the forest since its generation. As the algorithm iterates, the age value gradually increases, reflecting the survival time of the feature tree during the search process. Simultaneously, a preset lifetime limit is set as the maximum number of iterations a single tree is allowed to survive. Furthermore, the number of features contained in the currently processed feature subset is denoted as features.
[0061] Optionally, at the beginning of each iteration, based on the three parameters mentioned above, the generation strategy coefficient (GSC) is dynamically calculated for each feature tree. The calculation formula is as follows:
[0062] Optionally, after calculation, PFSFOA adjusts the feature tree selection strategy based on the GSC value. Since GSC is inversely proportional to Age, older, high-quality feature trees will obtain relatively stable GSC values, thus continuously contributing high-quality offspring; while younger, low-quality feature trees, although initially having higher GSCs, are quickly eliminated, and their actual impact is limited.
[0063] S508. The processing results of each feature subset are compared using a pre-designed decision container to determine the processing results that meet the preset evaluation criteria as the target feature set of the original feature set.
[0064] Optionally, Figure 4 This is a flowchart illustrating a specific implementation of a data feature selection method provided in an embodiment of this application, as shown below. Figure 4 As shown, the processing results output after iteration of each feature subset are uniformly collected into a decision container. This decision container pre-sets a comprehensive evaluation criterion for horizontal comparison of all local results. For example, average classification accuracy (CA) is used as the primary indicator, while auxiliary indicators such as decision rate (DR) are combined for multi-objective trade-offs. The decision container sequentially reads the processing results of each subset, extracts its evaluation index value, and sorts or scores the processing results of each feature subset.
[0065] Optionally, the decision container selects the local feature combination with the highest comprehensive score (or meets the preset threshold) as the target feature set of the original feature set; if it is necessary to further integrate the results of multiple subsets, multiple polymer sets can be merged and re-evaluated to finally determine a feature subset with the best overall performance as the target feature set of the original feature set.
[0066] In this application embodiment, a feature selection method for data is provided. The method quantifies the importance of features in each feature subset using the Gini coefficient and generates a feature tree accordingly. This heuristic strategy effectively avoids the blindness of random initialization, improving the quality of the initial forest and the convergence efficiency of subsequent iterations. The dynamic optimization iteration process based on the age hyperparameter of the feature tree achieves adaptive control of the search process, overcoming the limitations of manually setting fixed hyperparameters in traditional methods. This allows high-quality individuals to have more optimization opportunities while low-quality individuals are quickly eliminated, thereby enhancing the algorithm's convergence speed and global search capability. A pre-designed decision container is used to uniformly evaluate and compare the processing results of each parallel branch, ensuring that the final selected feature set reaches global optimum under preset evaluation criteria, thus improving the reliability of the results.
[0067] Please see Figure 6 , Figure 6 This is a structural block diagram of a data feature selection device provided in an embodiment of this application. Figure 6 As shown, the data feature selection device 600 includes: The first selection module 610 is used to sort the features in the original feature set by importance based on the first feature selection algorithm, and to filter each feature based on the sorting result to generate a candidate feature set. The second selection module 620 is used to divide the candidate feature set into multiple feature subsets, and to process each feature subset in parallel based on the second feature selection algorithm. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset. The result determination module 630 is used to determine the target feature set of the original feature set based on the processing results of each feature subset.
[0068] In some possible embodiments, the second feature selection algorithm is a parallel feature selection forest optimization algorithm. The second selection module 620 is also used to generate feature trees corresponding to each feature subset based on the importance of each feature in each feature subset in the parallel feature selection forest optimization algorithm, and to iteratively process each feature tree by optimizing the hyperparameters of each feature tree.
[0069] In some possible embodiments, the second selection module 620 is further configured to determine the importance of each feature in each feature subset by means of the Gini coefficient, and generate a feature tree corresponding to each feature subset based on the importance of each feature.
[0070] In some possible embodiments, the second selection module 620 is further configured to calculate the hyperparameters of each feature tree based on the age hyperparameters of each feature tree, and to perform iterative processing on each feature tree using the hyperparameters of each feature tree.
[0071] In some possible embodiments, the first selection module 610 is further used to search for features in the original feature set by means of a random forest algorithm to determine multiple features that meet a preset importance criterion.
[0072] In some possible embodiments, the second selection module 620 is further configured to scan the candidate feature set using a sliding window of a preset dimension to generate multiple feature subsets.
[0073] In some possible embodiments, the result determination module 630 is further configured to compare the processing results of each feature subset through a pre-designed decision container, and determine the processing results that meet the preset evaluation criteria as the target feature set of the original feature set.
[0074] In this embodiment of the application, a feature selection device for data is provided, wherein a first selection module is used to sort the features in the original feature set by importance based on a first feature selection algorithm, and to filter each feature based on the sorting result to generate a candidate feature set; a second selection module is used to divide the candidate feature set into multiple feature subsets, and to process each feature subset in parallel based on a second feature selection algorithm, wherein the second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset; and a result determination module is used to determine the target feature set of the original feature set based on the processing result of each feature subset. First, the first selection module evaluates and ranks the importance of features using a first feature selection algorithm, quickly filtering out a large number of irrelevant or redundant features and compressing the high-dimensional original feature set into a smaller set of candidate features, thereby reducing the complexity and computational cost of subsequent processing. Next, the second selection module divides the features into subsets and uses a second feature selection algorithm for parallel processing, fully utilizing multi-core computing resources and shortening the processing time for large-scale high-dimensional datasets. Simultaneously, parallel iterative optimization of the feature trees corresponding to the feature subsets helps to search for optimal feature combinations more precisely in both local and global contexts, improving the accuracy and robustness of feature selection. Finally, the result determination module selects the globally optimal target feature set from multiple parallel results, ensuring the quality of the results while avoiding the high cost of serial global searches. Compared to the randomness of single evolutionary algorithms, this ensemble decision-making reduces performance fluctuations caused by initialization or local traps. In the method of this application, the efficient selection of high-quality candidate features using the first feature selection algorithm, combined with the parallel processing of the second feature selection algorithm, improves the processing efficiency of high-dimensional data feature selection while also ensuring the optimization quality of feature subsets, effectively solving the problems of high computational cost and slow convergence of traditional single evolutionary algorithms in high-dimensional scenarios.
[0075] This application also provides a computer storage medium that can store multiple instructions adapted for loading by a processor and executing the steps of any of the methods described in the above embodiments.
[0076] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Figure 7 As shown, terminal 700 may include: at least one terminal processor 701, at least one network interface 704, user interface 703, memory 705, and at least one communication bus 702.
[0077] The communication bus 702 is used to enable communication between these components.
[0078] The user interface 703 may include a display screen and a camera. Optionally, the user interface 703 may also include a standard wired interface and a wireless interface.
[0079] The network interface 704 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0080] The terminal processor 701 may include one or more processing cores. The terminal processor 701 connects to various parts within the terminal 700 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 705, and by calling data stored in the memory 705. Optionally, the terminal processor 701 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The terminal processor 701 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the terminal processor 701.
[0081] The memory 705 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 705 may include a non-transitory computer-readable storage medium. The memory 705 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 705 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 705 may also be at least one storage device located remotely from the aforementioned terminal processor 701. Figure 7 As shown, the memory 705, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a data feature selection program.
[0082] exist Figure 7 In the terminal 700 shown, the user interface 703 is mainly used to provide an input interface for the user and to obtain the user's input data; while the terminal processor 701 can be used to call the feature selection program of the data stored in the memory 705, and specifically perform the following operations: The first feature selection algorithm is used to sort the features in the original feature set by importance, and the features are then filtered based on the sorting results to generate a candidate feature set. The candidate feature set is divided into multiple feature subsets, and each feature subset is processed in parallel based on the second feature selection algorithm. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset. The target feature set of the original feature set is determined based on the processing results of each feature subset.
[0083] In some possible embodiments, the second feature selection algorithm is a parallel feature selection forest optimization algorithm. When the terminal processor 701 performs parallel processing on each feature subset based on the second feature selection algorithm, it specifically performs the following steps: In the parallel feature selection forest optimization algorithm, based on the importance of each feature in each feature subset, a feature tree corresponding to each feature subset is generated, and each feature tree is iteratively processed by optimizing the hyperparameters of each feature tree.
[0084] In some possible embodiments, when the terminal processor 701 generates a feature tree corresponding to each feature subset based on the importance of each feature in each feature subset, it specifically performs the following steps: determining the importance of each feature in each feature subset using the Gini coefficient, and generating a feature tree corresponding to each feature subset based on the importance of each feature.
[0085] In some possible embodiments, when the terminal processor 701 performs iterative processing on each feature tree by optimizing the hyperparameters of each feature tree, it specifically performs the following steps: calculating the hyperparameters of each feature tree based on the age hyperparameters of each feature tree, and performing iterative processing on each feature tree using the hyperparameters of each feature tree.
[0086] In some possible embodiments, when the terminal processor 701 performs the following steps when it sorts the features in the original feature set by importance based on the first feature selection algorithm and filters each feature based on the sorting result: it searches the features in the original feature set by the random forest algorithm to determine multiple features that meet the preset importance criteria.
[0087] In some possible embodiments, when the terminal processor 701 divides the candidate feature set into multiple feature subsets, it specifically performs the following steps: scanning the candidate feature set using a sliding window of a preset dimension to generate multiple feature subsets.
[0088] In some possible embodiments, when the terminal processor 701 determines the target feature set of the original feature set based on the processing results of each feature subset, it specifically performs the following steps: comparing the processing results of each feature subset through a pre-designed decision container, and determining the processing results that meet the preset evaluation criteria as the target feature set of the original feature set.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0090] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0091] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0092] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0093] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0094] The above is a description of a data feature selection method, apparatus, storage medium, and terminal provided in this application. For those skilled in the art, based on the ideas of the embodiments of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for feature selection of data, characterized in that, The method includes: The first feature selection algorithm is used to sort the features in the original feature set by importance, and the features are then filtered based on the sorting results to generate a candidate feature set. The candidate feature set is divided into multiple feature subsets, and each feature subset is processed in parallel based on the second feature selection algorithm. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset. The target feature set of the original feature set is determined based on the processing results of each feature subset.
2. The method according to claim 1, characterized in that, The second feature selection algorithm is a parallel feature selection forest optimization algorithm. The parallel processing of each feature subset based on the second feature selection algorithm includes: In the parallel feature selection forest optimization algorithm, feature trees corresponding to each feature subset are generated based on the importance of each feature in each feature subset, and each feature tree is iteratively processed by optimizing the hyperparameters of each feature tree.
3. The method according to claim 2, characterized in that, The process of generating a feature tree corresponding to each feature subset based on the importance of each feature in each feature subset includes: The importance of each feature in each feature subset is determined by the Gini coefficient, and a feature tree corresponding to each feature subset is generated based on the importance of each feature.
4. The method according to claim 2, characterized in that, The iterative processing of each feature tree by optimizing its hyperparameters includes: The hyperparameters of each feature tree are calculated based on the age hyperparameters of each feature tree, and the feature trees are iteratively processed using the hyperparameters of each feature tree.
5. The method according to claim 1, characterized in that, The process of ranking the features in the original feature set based on the first feature selection algorithm, and then filtering each feature based on the ranking result, includes: The random forest algorithm is used to search for features in the original feature set to determine multiple features that meet the preset importance criteria.
6. The method according to claim 1, characterized in that, The step of dividing the candidate feature set into multiple feature subsets includes: The candidate feature set is scanned using a sliding window of a preset dimension to generate multiple feature subsets.
7. The method according to claim 1, characterized in that, The step of determining the target feature set of the original feature set based on the processing results of each feature subset includes: The processing results of each feature subset are compared by a pre-designed decision container, and the processing results that meet the preset evaluation criteria are determined as the target feature set of the original feature set.
8. A data feature selection device, characterized in that, The device includes: The first selection module is used to sort the features in the original feature set by importance based on the first feature selection algorithm, and to filter each feature based on the sorting result to generate a candidate feature set. The second selection module is used to divide the candidate feature set into multiple feature subsets, and to process each feature subset in parallel based on the second feature selection algorithm. The second feature selection algorithm is used to iterate the feature tree corresponding to each feature subset. The result determination module is used to determine the target feature set of the original feature set based on the processing results of each feature subset.
9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the steps of the method as described in any one of claims 1 to 7.
10. A terminal, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described in any one of claims 1 to 7.