# Predicting Hard Disk Failure by Means of Automatized Labeling and Machine Learning Approach
## 4 Proposed Approach
### RGF-Based Machine Learning Approach  
#### 4.2.1 Training of Models  
The considered dataset \(S_{d}\) needs to be split into training, \(S_{L}\), and test, \(S_{T}\), sets. As there is a need to classify each hard disk according to its state of health, a binary classification distinguishing between \"at-risk\" \(s_{b}\) and \"not at risk\" \(s_{h}\) disks must be performed. The classification phase is performed by using the RGF model. The training algorithm requires a tuning of the hyperparameters. The goal is to learn a single nonlinear function \(h(\mathbf{x})\) on some input vectors \(\mathbf{x}\in S_{L}\) with labels \(Y\), minimizing the argument of a loss function \(L(h(X),Y)\). The algorithms used for learning can be RGF with \(L_{2}\) regularization on leaf-only models (referred to as \"RGF\" in the following), or the RGF with Minimum-Penalty Regularization (\"_RGF_Opt_\") or RGF with min-penalty regularization with Sum-to-zero Sibling constraints (\"_RGF_Sib_\"). The _number of leaves_ is a data-dependent hyperparameter, and its tuning affects the training time. The number of leaves can be chosen in the range of (1000, 10,000). The _degree of regularization_\(\lambda\) can be adjusted choosing a value as small as needed \(\{1,...10^{-20}\}\). A lower value of \(\lambda\) reduces the importance of the regularization in the regularized loss functions. The hyperparameter _maximum depth_\(\gamma\) is a parameter used only with the two Minimum-Penalty Regularization models and indirectly tunes the importance of nodes because a smaller value ensures a lesser penalty for deeper nodes. In the two min-penalty regularizers, the \(d_{v}\) represents the distance from the root of the generic node \(v\), and the constant hyperparameter is elevated as \(\gamma^{d_{v}}\). Thus, higher values of \(\gamma\) penalizes deeper nodes. The last hyperparameter of interest is the _Test Interval_, i.e., the number of leaves added per each iteration. Besides the ones just listed, there are others hyperparameters whose configurations, if not defined, do not prevent model training but can help improving its efficiency and effectiveness. Their contribution will not be discussed in this paper, and the amplitudes exploited during the performance assessment have been set to their default value. The hyperparameter tuning, together with the choice of the number of observation days, create a number of possible configurations that can rapidly reach a few thousands. A drastic reduction of the experiments number without losing significance can be made by means of a Design Of Experiments (DOE) using the Taguchi Orthogonal Array Designs [17];in particular, each combination of factor levels exploited to carry out a specific experiment is referred to as plan configuration. Some of the considered parameters, such as the width of the observation window, lambda, the number of leaves, etc., can assume values within large intervals. The purpose of the design of experiments is to evaluate the effect of all parameters in some significant configurations for training purposes; this way, for each parameter, a suitable, limited number of values has been established according to both their typical interval of variation and authors' knowledge and experience. The choice of levels for each factor is limited to the number of configurations of the experiment plan used. The risk of overfitting is averted. Due to the limited number of possible combinations, it is necessary to execute the experiment plan within intervals that reasonably already give good performance. The optimal configuration is therefore identified between levels of factors that do not cause overfitting. It is also possible to make a comparison between the performances obtained in the optimal case and in all cases foreseen by the experiment plan. This further comparison allows the system to obtain the certainty of having achieved the best performance among all the tested combinations.