## 3 Materials and Methods
### Support Vector Machine  
The SVM algorithm was first designed to detect similarities by creating a decision boundary with support vectors. Because SVM is a convex model, it provides consistent and well-balanced results. This approach seeks out an optimal hyperplane that divides observations into classes based on patterns of information about them. SVM has significantly advanced through convex optimization, statistical learning theory, and kernel functions. When building the hyperplane to separate data, it is necessary to evaluate the dot products between two training data vectors. In Hilbert space, the dot product has a kernel representation, meaning the evaluation of the dot product is not solely dependent on the space's dimension. There are two main types of SVM: Support Vector Classification (SVC) and Support Vector Regression (SVR). In this analysis, we will be utilizing the SVR method [51; 52; 53]. SVR transforms the original data vector \(x\) into a higher dimensional space \(F\) using a nonlinear transformation \(\psi\). Then, linear regression is applied as shown in the Equation (8):  
\[f(x)=(w\cdot\Phi(x))+b(\Phi:R^{n}\to F,w\in F) \tag{8}\]  
where \(b\) is the threshold value. The resulting regression in a high-dimensional feature space corresponds to a non-linear regression in the low-dimensional input space, thus avoiding the computation of the dot product of \(w,\Phi(x)\) in a high-dimensional space. Since \(\Phi\) is a map, the \(w\) value can be obtained from the data by minimizing the sum of the empirical risk \(R_{emp}\) and a complexity term \(\parallel w\parallel^{2}\) that imposes flatness on the feature space. This becomes a constrained optimization problem, which can be solved using Lagrange multipliers, as indicated in Equation (9):  
\[R(w)=R_{emp}+\lambda\parallel w\parallel^{2}=\sum_{i=1}^{l}e(f(x_{i})-y_{i})+ \lambda\parallel w\parallel^{2} \tag{9}\]  
where \(l\) is the number of examples, \(\lambda\) is a regularization term, and \(e(. )\) is a cost function. The \(e(. )\) function is expressed in Equations (10)-(12). 1. Linear \(e\)-insensitive Cost Function (): \[e(f(x)-y)=max(0,\mid f(x)-y\mid-e)\] (10)
2. Quadratic Cost Function: \[e(f(x)-y)=(f(x)-y)^{2}\] (11)
3. Huber Cost Function: \[e(f(x)-y)=\left\{ \begin{array}{ll}\mu\mid f(x)-y\mid-\frac{\mu^{2}}{2},& \text{si}\mid(fx)-y\mid>\mu.\\ \frac{1}{2}\mid f(x)-y\mid^{2},&\text{another}.\end{array} \right.\] (12)  
\(R(w)\) must be minimized from Equation (9) using Equation (13):  
\[w=\sum_{i=1}^{l}(\alpha_{i}-\alpha_{i}^{*})\Phi(x_{i}) \tag{13}\]where \(\alpha_{i}-\alpha_{i}^{*}\) is the solution that minimizes \(R(w)\). In the optimization problem of \(\alpha_{1}\) y \(\alpha_{i}^{*}\), the non-zero values for \(x_{i}\) for each respective value of \(\alpha_{i}\), \(\alpha_{i}\) are called Equation (8), where it can be rewritten as Equation (14):  
\[ \begin{split} f(x)&=\sum_{i=1}^{l}(\alpha_{i}- \alpha_{i}^{*})(\Phi(x_{i})\Phi(x))+b\\ &=\sum_{i=1}^{l}(\alpha_{i}-\alpha_{i}^{*})K(x_{i},x)+b\end{split}  \tag{14}\]  
where \(K(x_{i},x)+b=\Phi(x_{i})\cdot\Phi(x)\) is called the _kernel_ function, uses a symmetric kernel function that meets the Mercer conditions, and represents a dot product in a feature space. To obtain the value of \(b\), we can select a point on the margin using the newly rewritten Equation (14). Taking the average of all points in the margin is typically recommended, as shown in Equation (15):  
\[b=\text{average}_{k}\{\delta_{k}+y_{k}-\sum_{i=1}^{l}(\alpha_{i}-\alpha_{i_{i}} ^{*})K(x_{i},x_{k})\} \tag{15}\]  
where \(\delta_{k}\) is a prediction error for the linear \(\epsilon\)-insensitive cost function \(\delta_{k}=\epsilon\text{sign}(\alpha_{k}-\alpha_{k}^{*})\) and for the Huber cost function \(\delta_{k}=(1/C)(\alpha_{k}-\alpha_{k}^{*})\). The strategy of the kernel is to convert the input data into the necessary format for processing. This enables the SVM algorithm to map data from a lower to a higher dimension.