## 3 Materials and Methods
### K-Class Model Evaluation  
Evaluation of a K-class model implies studying \(K\times K\) values of its corresponding sensitivity \(\mathbf{S}\) matrix. Any given problem with more than \(K>2\) makes it practically impossible to work with. In our case, it would be 64 values of sensitivity and specificity. Several metrics have been proposed to address this problem [62; 63]. These metrics, in most of the cases, are obtained from the sensitivity of every individual class model, pair-wise specificities, efficiency or the total sensitivity, total specificity, and total efficiency of all class models, including convex combination of individual sensitivities and specificities. In particular, the mean of both is named accuracy in reference [48], but in [35], accuracy is the proportion of true assignations (positives or negatives). In general, these indexes are less sensible to changes in \(\mathbf{S}\) matrix. For this reason, they are not well suited for a systematic comparison of class models, for example, in an optimization.  
One alternative is to apply entropy concept as a measure of the order/information within the states of a system. A K-class model could be seen as a system whose states are the classes, and the information is provided by the sensitivities and specificities for each class model (\(K\) models in total). One K-class model will be better if it has less entropy according to [PERSON]'s entropy definition. In other words, a better class model will provide more information and better sensitivities and specificities if it successfully assigns sEMG signals to the model of each class and rejects the ones that do not belong to it, thus reducing the uncertainty or entropy of the system. In [PERSON]'s notation, followed in this paper, the entropy value will be 0 if all elements of \(\mathbf{S}\) are ones, and it will be perfectly precise, leaving no room for uncertainty.  
The development of this idea for confusion matrix can be found in references [64; 65]. The first one proposes, for the first time, a measure of the order/information generated by a classification method, called confusion entropy (CEN), inspired by [PERSON]'s entropy. The second solves a deficiency of CEN by proposing modified confusion entropy (MCEN).  
MCEN was evaluated and generalized in [46], defining a new index, diagonal modified confusion entropy (DMCEN), for sensitivity and specificity to evaluate K-class models. It also introduces one modification to solve MCEN's almost unresponsiveness to differences in sensitivity by explicitly accounting for the contribution of sensitivity against specificity in the parameter \(w\). This parameter can take values from zero to one; in our work, has was chosen \(w=0.5\).  
A detailed description of DMCEN is out of the scope of this paper. Qualitatively, the idea is that for the computation of Shannon's entropy of a \(C_{j}\) class, is necessary to define the probability that the system is in class \(C_{j}\) in relation to another class \(C_{m}\), for this it is considered as reference for all the decisions that involve both classes. In other words, to evaluate one K-class model, is necessary to take into account its whole \(\mathbf{S}\) matrix.  
In this work, DMCEN was calculated using an ad-hoc MATLAB code, available in reference [66], that calculates global DMCEN and for each class given an \(\mathbf{S}\) matrix. DMCEN can take values from zero to one, and the lower DMCEN, the better the K-class model is.