# Hard Disk Failure Prediction Based on Blending Ensemble Learning
## 4 Experiment
### Data Preprocessing
#### 4.2.1 Feature Selection  
Since each S.M.A.R.T. feature in the dataset is divided into raw values and normalized values, and we are not clear about the standard of each hard disk manufacturer for normalizing the features, we discard the normalized values, retain the raw values, and normalize with our own standard. After the data of the disk model ST4000 DM000 is screened out, all normalized values and the feature columns represented as completely empty were firstly removed (because the statistics of all disk models were collected together, there would be features owned by one model of hard disk but not owned by another model, which were all empty for the latter). Next, we standardized the data in blocks (detailed in Section 4.2.2) and deleted all zero columns after standardization. Because the data were collected quarterly, the intersection of features of the four quarters was taken after processing the data separately, so the remaining 15 features were left. Violin plots and box plots of these 15 features were drawn based on the criterion of failure or not (in fact, these two kinds of graphs have \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Data** & **Serial\_NUMBER** & **Model** & **Capacity\_Bytes** & **Failure** & **Smart\_1\_Normalized** & **Smart\_1\_Raw** \\ \hline
2022/6/21 & ZLW18P9K & ST14000 NM001G & \(1.4\times 10^{13}\) & 0 & 81 & \(1.31\times 10^{8}\) \\
2022/6/21 & 71 ROA0 QBFV8G & TOSHIBA & \(1.6\times 10^{13}\) & 0 & 100 & 0 \\  & MG08 ACA16 TEY & \(1.6\times 10^{13}\) & 0 & 100 & 0 \\
2022/6/21 & ZA1 FLE1P & ST8000 NM0055 & \(8\times 10^{12}\) & 0 & 71 & 12,339,896 \\
2022/6/21 & ZA16 NQJR & ST8000 NM0055 & \(8\times 10^{12}\) & 0 & 79 & 74,303,920 \\  & & TOSHIBA & & & & \\
2022/6/21 & 1050A084F97G & MG07 ACA14 TA & \(1.4\times 10^{13}\) & 0 & 100 & 0 \\  & & HGST & & & & \\
2022/6/21 & PL1331 LAHEYUGH & HMS5C4040 BLE640 & \(4\times 10^{12}\) & 0 & 100 & 0 \\
2022/6/21 & ZA130 TTW & ST8000 DM002 & \(8\times 10^{12}\) & 0 & 79 & 88,707,864 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Selected portion of the BackBlaze hard disk dataset. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Year** & **Drive Count** & **Drive Failures** & **Annualized Failure Rate** \\ \hline
2016 & 34,738 & 938 & 2.7\% \\
2017 & 32,070 & 1017 & 3.17\% \\
2018 & 23,236 & 581 & 2.5\% \\
2019 & 19,211 & 402 & 2.09\% \\
2020 & 18,939 & 269 & 1.42\% \\
2021 & 18,611 & 339 & 1.82\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Statistics of ST4000 DM000 hard disk. the same expression meaning), and 10 features, which were more distinguishable, were selected. Finally, in order to prevent feature redundancy, a heat map of these 10 features was drawn. One or more features were selected from the feature groups with strong correlation among these features, and five features were finally used in the experiment. In essence, each feature of different types of data is numerically distinguished according to the category of violin plot and box plot, and boundary data such as median and two quarter quantiles of each feature points of each type of data are marked. Through the visualization of these data, the numerical differences between samples of different categories can be easily detected. The difference between the two charts is that the violin plot can reflect the numerical quantity distribution. The box plot can better distinguish the quantile. As shown in Figure 5, all features are clustered between 0 and 1 because they were normalized prior to drawing. According to these two plots, we can further select 10 features from these 15 features that can distinguish healthy and failed samples more numerically. Figure 5: (**a**) Violin plot based on 15 features preliminarily selected. (**b**) Box plot based on 15 features preliminarily selected. Figure 6 shows the heat map drawn with 15 features preliminarily screened, and the color in each cell represents the correlation degree between the corresponding horizontal and vertical features.