## 2 Materials and Methods
### Hyperplane Classification Method
\begin{pmatrix}x_{1}&x_{2}&\ldots&x_{m}&1\\ x_{1}^{L}(i,1)&x_{2}^{L}(i,1)&\ldots&x_{m}^{L}(i,1)&1\\ x_{1}^{L}(i,2)&x_{2}^{L}(i,2)&\ldots&x_{m}^{L}(i,2)&1\\ \vdots&\vdots&\ldots&\vdots&1\\ x_{1}^{L}(i,m)&x_{2}^{L}(i,m)&\ldots&x_{m}^{L}(i,m)&1\\ \end{pmatrix} =0, \tag{9}\]  
and expand (9) by the first line:  
\[\overbrace{\left(-1^{1+1}\right)\det \begin{pmatrix}x_{2}^{L}(i,1)&x_{3}^{L}( i,1)&\cdots&x_{m}^{L}(i,1)&1\\ x_{2}^{L}(i,2)&x_{3}^{L}(i,2)&\cdots&x_{m}^{L}(i,2)&1\\ \vdots&\vdots&\ldots&\vdots&\vdots\\ x_{2}^{L}(i,m)&x_{3}^{L}(i,m)&\cdots&x_{m}^{L}(i,m)&1\\ \end{pmatrix} }x_{1}+\overbrace{+\left(-1^{1+2}\right)\det \begin{pmatrix}x_{ 1}^{L}(i,1)&x_{1}^{L}(i,1)&\cdots&x_{m}^{L}(i,1)&1\\ x_{1}^{L}(i,2)&x_{3}^{L}(i,2)&\cdots&x_{m}^{L}(i,2)&1\\ \vdots&\vdots&\ldots&\vdots&\vdots\\ x_{1}^{L}(i,m)&x_{3}^{L}(i,m)&\cdots&x_{m}^{L}(i,m)&1\\ \end{pmatrix} }x_{2}+\cdots+\overbrace{+\left(-1^{1+k}\right)\det \begin{pmatrix}x_{ 1}^{L}(i,1)&\cdots&x_{k-1}^{L}(i,1)&x_{k+1}^{L}(i,1)&\cdots&x_{m}^{L}(i,1)&1\\ x_{1}^{L}(i,2)&\cdots&x_{k-1}^{L}(i,2)&x_{k+1}^{L}(i,2)&\cdots&x_{m}^{L}(i,2)&1\\ \vdots&\cdots&\vdots&\vdots&\cdots&\vdots&\vdots\\ x_{1}^{L}(i,m)&\cdots&x_{k-1}^{L}(i,m)&x_{k+1}^{L}(i,m)&\cdots&x_{m}^{L}(i,m)&1\\ \end{pmatrix} }x_{k}+\cdots+ \tag{10}\]\[\overbrace{ \begin{pmatrix}-1^{1+m}\end{pmatrix} \text{det} \begin{pmatrix}x_{1}^{ L}(i,1)&x_{2}^{L}(i,1)&\cdots&x_{m-1}^{L}(i,1)&1\\ x_{1}^{L}(i,2)&x_{2}^{L}(i,2)&\cdots&x_{m-1}^{L}(i,2)&1\\ \vdots&\vdots&\cdots&\vdots&\vdots\\ x_{1}^{L}(i,m)&x_{2}^{L}(i,m)&\cdots&x_{m-1}^{L}(i,m)&1\end{pmatrix} }x_{m}+\] \[+\overbrace{ \begin{pmatrix}-1^{2+m}\end{pmatrix} \text{det} \begin{pmatrix}x_{1}^{L}(i,1)&x_{2}^{L}(i,1)&\cdots&x_{m}^{L}(i,1)\\ x_{1}^{L}(i,2)&x_{2}^{L}(i,2)&\cdots&x_{m}^{L}(i,2)\\ \vdots&\vdots&\cdots&\vdots\\ x_{1}^{L}(i,m)&x_{2}^{L}(i,m)&\cdots&x_{m}^{L}(i,m)\end{pmatrix} }.\]  
The classification takes place according to the obtained vector of weighting coefficients of the hyperplane \(W\). The linear classifier \(d\left(\mathbf{X}^{\prime}\right)\) is defined as follows:  
\[d(\mathbf{X}^{*})=\mathbf{W}^{T}\mathbf{X}^{*}+b, \tag{11}\]  
where \(\mathbf{X}^{*}=\left({x_{1}}^{*},{x_{2}}^{*},\ldots,{x_{m}}^{*},1\right)^{T}\) is a normalized feature vector that defines the image of the classification object; \(\mathbf{W}=\left({w_{1},w_{2},\ldots,w_{m}}\right)^{T}\) is the vector of weight coefficients of the hyperplane classifier; and \(b\) is a free coefficient (scalar). The output data of the hyperplane classification method are the results of the classifier (5). Belonging to a class is determined by the rule of relation to the classifier; that is, the object's location relative to the class line is determined. To classify new data, their location in multidimensional space is determined by determining their position relative to the hyperplane. Substituting the data coordinates into the hyperplane equation, their location is determined from the set \(\left\{-1,1\right\}\). If the result is \(<\)0, then the investigated element is located \"to the right\" of the hyperplane, and accordingly, the person's face corresponds to the emotional state of one class; if the result \(>\) 0, the element is located \"to the left\" of the hyperplane and the detected face corresponds to an emotional state of another class; if the result is =0, then the element is located on the hyperplane, and the detected face corresponds to an undefined state.