# Hard Disk Failure Prediction Based on Blending Ensemble Learning
## 4 Experiment
### Experiments and Results  
The software environment of the experiment is Windows 10, which is equipped with an Intel Core i5-11260H [EMAIL_ADDRESS] GHz, 16G RAM, and an NVIDIA GeForce RTX 3050 laptop GPU. The deep learning algorithm used is Pytorch 1.10.2. Using the failed samples in the Seagate hard disks with model ST4000 DM000 and the samples of 14 days before the anomaly, the time span is from 2016 to 2022. A total of 12 sets of experiments without cross-data were constructed to explore the experimental results under different ratios of training set to test set. After the same standardized processing of data, random forest, GBDT, XGBoost, and AdaBoost classifiers were used as the first layer, and a BP neural network was used as the second layer for experiments and recorded as blending group A. Logistic regression, k-nearest neighbors, support-vector machine, and a Gaussian naive Bayes classifier were used as the first layer, and a BP neural network was used as the second layer for experiments and recorded as glending group B. The results of these two groups of experiments were compared with those obtained by using traditional methods. Before that, in order to further verify the validity of our experiment results, we tried to reproduce a three-layer stacked LSTM model [6] for comparison experiments, but as shown in Figure 8, its loss function presented an extremely unstable state, and the vibration was relieved when it was reduced to two layers. Therefore, we modified it. After processing with only one layer of LSTM and one layer of dropout, the loss function image behaved much more normally (as shown in Figure 9), and the test results were better than the complex model. It is speculated that the form of the data after standardization was too simple, leading the complex model to appear to have a serious shock peak, resulting in the reduced performance of the model; therefore, the simpler model was deemed more suitable for processing this kind of data. In addition, to further verify the rationality of the blending ensemble learning method, we added LSTM to the base learners to obtain better effects and criterion. We set up two additional experimental groups by removing the classifier with the least stable classification effect or least impact on the final result from the base learners of the original two groups of Blending experimental groups and replacing it with LSTM, thus obtaining Blending  
Figure 8: (**a**) Loss function change curve of three-layer stacked LSTM model. (**b**) Loss function change curve of two-layer stacked LSTM model. group C and Blending group D, respectively. Based on the observation and analysis of the intermediate results in the experimental process, we replaced the XGBoost in the base learner of blending group A with LSTM and the Gaussian Naive Bayes classifier in the base learner of blending group B with LSTM, thus obtaining two new ensemble learning models. Tables A1 and A2 in the appendix give the parameter values of some algorithms, and the algorithms not mentioned use default parameters. Experiments were carried out after everything was ready. The datasets of each year after processing were divided into 12 groups, and repeated experiments were conducted to make the results more convincing through averaging. The experimental results are shown in Table 4 and Figure 10.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Ratio** & \begin{tabular}{c} **Blending** \\ **Group A** \\ \end{tabular}  & \begin{tabular}{c} **Blending** \\ **Group C** \\ \end{tabular}  & \begin{tabular}{c} **Blending** \\ **Group B** \\ \end{tabular}  & \begin{tabular}{c} **Blending** \\ **Group D** \\ \end{tabular}  & \ \begin{tabular}{c} **BPNN** \\ **\end{tabular}  & \begin{tabular}{c} **LSTM** \\ \end{tabular}  \\ \hline
1:13.25 & 0.9709028 & 0.9706212 & **0.9736099** & 0.9498740 & 0.9713755 & 0.9484344 \\
1:5.3 & 0.9696904 & 0. From the experiment results, we can see that the blending ensemble learning method has significantly improved the evaluation criterion.