## 3 Materials and Methods
So, one or both of the above equations might not be met. This distinction between usual classifiers and the class modelling presented here will prove to be critical. The relative frequency matrix, \(\mathbf{F}\), Equation (2), can be obtained from Equation (1) as follows:  
\[\mathbf{F}= \begin{pmatrix}f_{jm}\end{pmatrix} = \begin{pmatrix}n_{jm}/I_{j} \end{pmatrix} ,\;j=1,\;\ldots,\;K,\;m=1,\ldots,K. \tag{2}\]  
As a consequence of the matrix \(\mathbf{N}\) structure and the use of the class modelling algorithm, each of the rows of the \(\mathbf{F}\) matrix, Equation (2), may not add 1, unlike a classification method. \(\mathbf{F}\) matrix has a relevant statistical meaning. The assignation of an sEMG signal to a class is applying a hypothesis test. Given \(K\) classes, this decision is a family/set of \(K(K-1)\) hypothesis tests such as those in Equation (3). It is composed of \(K-1\) tests for each of the \(K\) classes. The null Hypothesis H\({}_{0}\) is the same for each \(j=1,\ldots,K\), but H\({}_{1}\), the alternative hypothesis, is different for each one. \[ \begin{array}{l}\text{H}_{0}\text{: EMG signal belongs to gesture }C_{j}.\\ \text{H}_{1}\text{: EMG signal belongs to gesture }C_{m},\,m=1,\ldots,K,\,m\
eq j. \end{array}  \tag{3}\]  
**TEST** matrix, Equation (4), symbolically summarizes these tests. Each diagonal term contains the null hypothesis (H\({}_{0}\)), and the rest of the terms of the matrix contain the corresponding alternative hypothesis (H\({}_{1}\)). \[\mathbf{TEST}= \begin{pmatrix}\mathrm{H}_{0}:C_{1}&\mathrm{H}_{1}:C_{1}&\cdots& \mathrm{H}_{1}:C_{1}&\cdots&\mathrm{H}_{1}:C_{1}\\ \mathrm{H}_{1}:C_{2}&\mathrm{H}_{0}:C_{2}&\cdots&\mathrm{H}_{1}:C_{2}&\cdots& \mathrm{H}_{1}:C_{2}\\ \vdots&\vdots&\ddots&\vdots&&\vdots\\ \mathrm{H}_{1}:C_{j}&\mathrm{H}_{1}:C_{j}&\cdots&\mathrm{H}_{0}:C_{j}&\cdots& \mathrm{H}_{1}:C_{j}\\ \vdots&\vdots&&\vdots&\ddots&\vdots\\ \mathrm{H}_{1}:C_{K}&\cdots&\mathrm{H}_{1}:C_{K}&\cdots&\mathrm{H}_{0}:C_{K} \end{pmatrix} . \tag{4}\]  
Hypothesis test theory defines \(\alpha_{j}\) as the significance level and \(1-\beta_{mj}\) as the power of each test. These parameters are related to sensitivity and specificity of the test. Note that notation on sensitivity and power of the test vary and can be confusing, see references [35; 36; 48]; that is why they are defined below. The column \(j\)-th of \(\mathbf{TEST}\), Equation (4), corresponds to the \(K-1\) hypothesis tests of \(C_{j}\) class. Using the \(\mathbf{F}\) matrix, it is possible to calculate the significance level and power of the test and to define the sensitivity and specificity:  
* Sensitivity, \((1-\alpha_{j})=f_{jj}\) of \(\mathbf{F}\), Equation (2). This means the probability of correctly assigning an sEMG signal of class \(C_{j}\) to the class model of \(C_{j}\) annotated as \(s_{jj}\) in Equation (5). * Specificity, \((1-\beta_{mj})=(1-f_{mj})\)_when_\(m\
eq j\) corresponds to the rest of the elements of the columns of \(\mathbf{F}\), Equation (2). This means the probability of correctly not assigning an sEMG signal of class \(C_{m}\) to the class model of \(C_{j}\) annotated as \(s_{jm}\) in Equation (5). To sum up, sensitivity is the proportion of gestures that are assigned correctly to the modelled class, and specificity is the proportion of gestures correctly rejected from the modelled class. With this notation, matrix \(\mathbf{F}\) is transformed into matrix \(\mathbf{S}\) of sensitivities and specificities, Equation (5), that characterizes the performance of the \(K\)-class model. \[\mathbf{S}= \begin{pmatrix}s_{11}&s_{12}&\cdots&s_{1j}&\cdots&s_{1K}\\ s_{21}&s_{22}&\cdots&s_{2j}&\cdots&s_{2K}\\ \vdots&\vdots&&\vdots&&\vdots\\ s_{j1}&s_{2}&\cdots&s_{jj}&\cdots&s_{JK}\\ \vdots&\vdots&&\vdots&&\vdots\\ s_{K1}&s_{K2}&\cdots&s_{kj}&\cdots&s_{KK}\end{pmatrix} =