# 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 Preparation
#### 4.1.3 Data Preprocessing  
To ensure the quality of the subsequent feature selection and model construction, data preprocessing is an indispensable step. In this paper, three specific data preprocessing methods were employed, namely, missing value handling, outlier treatment, and standardization. This series of preprocessing steps significantly enhanced the data quality, reduced potential sources of errors in the models, facilitated a better understanding and interpretation of the data, and also led to a reduction in the computational burden, thereby improving computational efficiency. The specific procedures are outlined below.  
Stock feature data may exhibit issues such as missing values, format errors, or precision discrepancies due to network problems, time periods, or the absence of original data. Typically, it is necessary to address missing values, which are often represented as NaN or other placeholders and can be detected by examining the dataset. In this study, forward filling was employed to address missing values, where previous values are used to fill the gaps, preserving the continuity of the time series.  
Individual feature data may contain exceptionally large deviations, which can impact the standard deviation of the data and even lead to the distortion of the overall dataset. To address this issue, this paper employed the Median Absolute Deviation (MAD) method. For each feature, the median and MAD were calculated, where the median was the middle  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Categories of Features** & **Specific Features** \\ \hline Market Features & high, open, low, pre\_close, \\  & pct\_change, change, avg\_price \\ \hline Trading Features & vol\_ratio, vol, turn\_over \\  & amount, selling, buying \\ \hline Market Value Features & pe, float\_mv, total\_mv, swing \\  & activity, strength, attack \\ \hline \hline \end{tabular}
\end{table}
Table 1: Initial feature set.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Statistical Metrics** & **ICBC** & **GD Power** & **China Unicom** \\ \hline count & 716 & 716 & 716 \\ mean & 4.87 & 2.72 & 4.35 \\ std & 0.38 & 0.80 & 0.68 \\ min & 4.06 & 1.80 & 3.31 \\
25\% & 4.63 & 2.11 & 3.81 \\
50\% & 4.85 & 2.42 & 4.26 \\
75\% & 5.15 & 3.02 & 4.92 \\ max & 6.01 & 4.94 & 6.18 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Descriptive statistics for each dataset.  
value, and MAD was the median of the absolute differences between each data point and the median. Outliers are typically defined as data points deviating from the median by a certain extent, and in this study, the threshold for identifying outliers was set at three times the MAD. Subsequently, each data point for each feature was examined, comparing the absolute difference between each data point and the median with the threshold for outliers. If the absolute difference was greater than the threshold, the data point was flagged as an outlier. Finally, each identified outlier was set to the median to mitigate its impact on the data. Removing outliers contributes to enhancing the robustness and accuracy of the model.  
Stock feature data may exhibit differences in magnitude, necessitating standardization to ensure comparability among different features. This paper employed the z-score normalization method due to its simplicity in calculation and its suitability for data approaching a normal distribution. This standardization method helps ensure that the magnitudes of different features do not adversely affect the interpretability of the model and facilitates the exploration of relationships between features and stock price trends. By transforming the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, the values of different features share the same scale, making them suitable for comparison and modeling.