## 2 Theoretical Background
### ML Models
#### 2.1.1 Support Vector Machines (SVMs)  
A SVM is a supervised learning AI algorithm developed by [PERSON] and [PERSON] [81] that is widely used in classification tasks and can manage large feature spaces, because the dimension of the classified vectors used for the training phase does not have an influence on the performance. Thus, the SVM is a good approach for fault diagnosis, since the vibration features might not have to be limited. It has good generalisation properties, because in the goal of the training phase is the minimisation of the Structural Misclassification Risk (SMR) [82; 83; 84]. The SMR is an inductive principle of use in ML, which was introduced by [PERSON] and [PERSON] [85] and is implemented through the minimisation of the expression reported in Equation (1):  
\[E_{train}+\lambda\;H(\mathbf{w}) \tag{1}\]  
where \(E_{train}\) is the training error, \(\lambda\) is the constant regularisation term, \(H\) is the regularisation function that controls the trade-off between minimising the training error and minimising the expected gap between the training and test errors, and \(\mathbf{w}\) is the vector containing the weight of each feature. Thus, the cost function \(J\) of the algorithm can be written as reported in Equation (2):  
\[J(\mathbf{w})=\frac{1}{2N}\sum\limits_{i=1}^{N}(h_{\mathbf{w}}(\mathbf{x}_{i})-y_{i})^{2} +\frac{\lambda}{2}\sum\limits_{j=1}^{d}\mathbf{w}_{j}^{2} \tag{2}\]  
where \(N\) is the number of examples in the database, \(\mathbf{x}\) the vector of the feature values related to the \(i\)-th example, \(h_{w}\) is the predicting function of the classifier, \(y\) is the label of the \(i\)-th example, \(d\) is the number of features, and \(w\) is the \(j\)-th entry of the vector of weights. Given the set of input data reported in Equation (3),  
\[D=\{(\mathbf{x}_{1},y_{1}),\ldots,(\mathbf{x}_{N},y_{N})\}\;\;\;\;\;i=1,\ldots,N \tag{3}\]  
which are labelled depending on the class (\(y_{i}=\pm 1\)). The linear SVM theory supposes that there exists a hyperplane that represent the boundary between classes. The hyperplane is expressed in Equation (4),  
\[\mathbf{w}^{T}\;\mathbf{x}+b=0 \tag{4}\]  
where \(b\) is a constant scalar term. The maximisation of the margin distance between the points and the decision hyperplanes provides some reinforcement to the algorithm, making the classification of new points simpler [86]. Considering the possible presence of noise in data with the slack variable \(\zeta_{i}\) and the error penalty constant \(C\), the optimal hyperplane that separates the data can be obtained as a solution to the optimisation problem of Equation (5):  
\[ \begin{array}{ll}\text{minimize}\;\frac{1}{2}\|\mathbf{w}^{2}\|+C\sum\limits _{i=1}^{N}\zeta_{i}\\ \text{s.t.}\;\;\begin{cases}y_{i}\left(\mathbf{w}^{T}\;x_{i}+b=0\right)\geq 1-\zeta_{i}, &i=1,\ldots,N\\ \zeta_{i}\geq 0,&i=1,\ldots,N\end{cases}\\ \end{array}  \tag{5}\]Replacing the weight vector \(\mathbf{w}\) with \(\mathbf{w}=\sum\limits_{i=1}^{N}\alpha_{i}y_{i}\mathbf{x}_{i}\), where \(\alpha\) is the weight of the \(i\)-th sample, the optimisation problem can be written in the form of Equation (6):  
\[f(x)=\text{sign}\left(\sum\limits_{i,j=1}^{N}\alpha_{i}y_{i}(\mathbf{x}_{i}\mathbf{x}_{ j})+b\right) \tag{6}\]  
SVMs can also be used in nonlinear classification problems that apply kernel functions, which map the \(d\)-dimensional input vector \(\mathbf{x}\) into a \(l\)-dimensional feature space to make a linear classification feasible.