# Research on Ensemble Learning-Based Feature Selection Method for Time-Series Prediction
## 4 Experimental Results and Analysis of Feature Selection Based on Ensemble Learning
### Experimental Results and Analysis  
Next, we employed the five feature selection methods determined in Section 3.2 to assess the importance scores of each feature in the initial feature set for different stocks. The results are presented in Figure 2.  
Two main observations are clearly evident from the graph. Firstly, different feature selection methods exhibited significant variations when analyzing the same stock data. Using ICBC as an example, various methods assigned relatively high scores to the \"low\" feature, but there were substantial score differences for the \"pe\", \"float_mv\", and \"avg_price\" features among different methods. This indicates a noteworthy variability in the impact of stock features under different feature selection methods. Secondly, concerning stock data from different industry sectors, there were notable variations in the importance score distributions for each feature. Using the GD Power dataset as an example, the \"low\" and \"avg_price\" features received relatively high scores across various evaluation methods, while other features had comparatively lower scores. In contrast, in the dataset for ICBC, features such as \"float_mv\" and \"pe\" obtained higher scores. This emphasizes the distinct importance of various features in different industry sectors. Therefore, to fully leverage the advantages of various feature selection methods on different data types, it is essential to employ ensemble learning methods to integrate the scores from different methods. Through the combination of scores from different methods, a more comprehensive consideration of the importance of different features under diverse data contexts can be achieved, thereby enhancing the model's robustness and performance. After obtaining the importance scores for each feature, weights for each feature selection method were calculated using the K-fold cross-validation method, as outlined in Section 3.2. In this study, K was set to 5, indicating the use of 5-fold cross-validation. The conclusive results are presented in Table 3.  
According to the data in Table 2, it is evident that the same feature selection method carries different weights across various types of stock data. Higher weights indicate that the features selected by that method exhibit superior predictive performance in the corresponding stock data. Consequently, the method is more suitable for this type of data. By assigning distinct weights to these methods, ensemble learning can select the most suitable feature selection method for each time-series data context and conduct comprehensive screening. Ultimately, this approach can achieve superior predictive performance and higher robustness when facing diverse types of time-series data requirements. After obtaining the importance scores \(s_{i,j}\) for each feature and the weights \(w_{i}\) for each feature selection method, the feature score weighting method was applied to calculate the top five ranked features for each stock dataset. The final feature subset \(S_{\text{final}}\) is presented in Table 4.  
Figure 2: Importance scores of features for each stock. Ultimately, to validate the effectiveness of the ensemble learning-based feature selection method, this study applied the five features \(S_{i}\) selected by each feature selection method and the final five features \(S_{final}\) chosen by the ensemble method to the task of stock price time-series prediction. The dataset, again, included the stock data of three companies: ICBC, GD Power, and China Unicom. The time range remained from 1 January 2020 to 1 January 2023. Long Short-Term Memory (LSTM) was chosen as the specific prediction model to ensure accuracy in the forecasting task. LSTM networks are a variant of recurrent neural networks specifically designed for processing and learning from time-series data. The core components of an LSTM network include cells and gates, with three main gates: the input gate, forget gate, and output gate. The memory cell is the heart of the LSTM network and is responsible for storing and passing information.