## 3 Methodology
### Classification  
It is the classification component that completes the proposed AFER system. A supervised machine learning technique is used to accomplish this operation. A variety of algorithms can be used, including artificial neural networks (ANNs), k-NNs, decision trees, or deep learning techniques (such as CNNs) [57; 58]. The author of [59] proposed the SVM classifier for this study. Several fields have shown this classifier's accuracy over the years. Datasets that are small and medium will be more suitable for this method. Recognizing unlabeled data will require the SVM classifier to be trained with labelled data. It is important to determine the ideal hyperplane in order to separate two datasets with two distinct classes during the learning phase of an SVM.  
To separate the members of one class from those of another, a hyperplane is constructed using the input space transformed into a higher-dimensional feature space. Based on statistical learning theory, it is a useful classification method. The data can be separated using many hyperplanes. To prevent misclassifications, only one can attain the maximum margin when determining the type of data, and the new data that belong to. \(S=\{x_{i},~{}d_{i}\}|~{}i=1,2,\ldots.N\}\) are usual for N training designs, with \(x_{i}=(x_{i1},~{}x_{i2},\ldots.\ldots.~{}\ldots,~{}x_{in})\in R^{n}\) being an input vector indicating a space in which to enter data and \(d_{i}\in\{-1,~{}1\}\) indicating the class of the label \(x_{i}\). The linear separability of S is assumed. Optimally separating the hyperplane with maximum margins is imperative to generalizing a linear SVM well. In particular, the SVM locates the optimal hyperplane for the pair \((w,b)\) by maximizing the margin \(2/||w||\). Between \(wx+b=1\) and \(wx+b=-1\), the perpendicular hyperplane of w points towards the separating plane and \(b\in R\).  
In this example, \((w_{0},~{}b_{0})\) corresponds to a separating hyperplane for S that is optimal. An SVM using linear decision functions can be calculated using a decision function f  
\[f(x)=sgn(w_{0}x^{t}+b_{0}) \tag{6}\]A sign function and matrix transpose operator are represented by \(sgn(\cdot)\)and \(t\), respectively.  
This introduces the following optimization problem when classifying non-separable data linearly with several slack variables \(\xi_{i}\).  
\[Minimize\frac{1}{2}W^{T}W+C\sum_{i=1}^{N}\xi_{i}\]  
\[Subject\ to\ d_{i}(W^{T}x_{i})\geq 1-\xi_{i},\ \xi_{i}\geq 0,\ i=1,\ldots\ldots \ldots N. \tag{7}\]  
It also acts as the regularization parameter for the SVM classifier, penalizing vectors incorrectly classified or within the margin.  
A solution based on optimization \(\widehat{\alpha}=(\overline{\alpha_{1}},\overline{\alpha_{2}},\ldots\overline {\alpha_{N}})\) can be used to calculate the pair \((\overline{w},\overline{b})\). This formula can be used to rewrite the nonlinear SVM decision function f:  
\[f(x)=sgn(w^{-t}x+\overline{b})=sgn(\sum_{i=1}^{N}\overline{\alpha_{1}}d_{i}K( x_{i},x)+\overline{b}) \tag{8}\]  
In a transformed space, \(K(\cdot,\ \cdot)\) is the kernel function used for fitting the maximum margin hyperplane. This paper uses the Gaussian radial basis function (GRBF) to specify kernel functions. For vector operations, the \(K\big{(}x_{i},x_{j}\big{)}=exp\bigg{(}\frac{(x_{i}-x_{j})^{2}}{2y^{2}}\bigg{)}\) GRBF spread is given by y, while the \(L_{2}\) norm is given by \(||.||\).  
A simplified version of the SVM is illustrated in Equation (9).  
\[y_{i}=sign((w,x_{i})+b) \tag{9}\]  
A maximum margin hyperplane is represented by \((w,x_{i})\), a bias is represented by b, a feature vector is represented by \(x_{i}\in\mathbb{R}^{d}\), and the labels are represented by \(y_{i}\in\{\pm 1\}\). SVMs typically use kernels to handle nonlinear data, but we use linear SVMs. Furthermore, binary classifiers cannot distinguish between the six basic emotions of AFER. A multi-class SVM classifier is therefore formed by combining six binary SVM classifiers.