## 3 Results
### Metric Results
#### 3.1.1 Model Confusion Matrix  
An analysis of the model's accuracy and loss function is indispensable in terms of model performance. A \(\sim\)96.7% accuracy was achieved with the test data. These data imply a high percentage of success in the classification with data not known _a priori_ by the model. However, suppose it is intended to delve into the model's behavior in more detail. In that case, it is convenient to pay attention to other evaluation metrics that contemplate how many samples among those labeled as the basal state have been classified correctly (NT) or incorrectly (FP) or, similarly, how many samples among those labeled as a stressed state have been classified correctly (TP) or incorrectly (FN). Figure 6 shows the confusion matrix of the proposed model. Figure 5: (Color online) Training and validation evolution. (**a**) Evolution of precision (_accuracy_); (**b**) Evolution of loss function (_loss_). Of the 1560 test images (_testing_) corresponding to the 40 participants in the experimental protocol, 780 concern subjects in a basal state and 780 individuals in a stressed state. According to Figure 6, the model correctly detects 730 as TN (baseline state) and 777 as TP (stressed state), which means that the model correctly predicts a high rate of samples labeled as baseline or stressed. The fact that the model presents a very high TP value (777 out of 780) and, consequently, a very low FP value (3 out of 780) is especially revealing since the purpose of the model is precisely the detection of a stressed state in order to prevent potential pathologies that could lead to severe health disorders. In the case of the value of TN, although it remains at high levels (730 of 780), it is lower than that of TP, implying that the FN value is somewhat higher than FP (50 of 780). Whatever its incidence, without detracting from it, since it is still a prediction error of the model, it is less relevant in terms of the expected goal. In any case, there are various metrics that, based on the confusion matrix, exploit the relationships established between the categories of the matrix. These links highlight aspects of the model that complete its analysis and the quality attributed to it, as detailed below. Concerning the sensitivity (_recall_)--the proportion of correct predictions of each class for the total observations of the said class--, its increase runs inextricably to the detriment of precision (_accuracy_) and vice versa. Therefore, for the stressed state class, it adopts a very high value (\(\sim\)1), while for the basal state class, its value remains high but somewhat less (0.94). Sensitivity is key in this work because it quantifies the model's performance against failed predictions. In particular, the sensitivity of the proposed model is practically 1, indicating that there are hardly any failures in the predictions of the stressed state. Therefore, a stress episode can be prevented and contained in almost all obvious cases before the situation worsens. In the context of the problem posed in this paper, \(F_{1}\)-score, a metric that is subject to FP and FN, that is, to sensitivity and precision, does not provide relevant information, since both Error types are balanced. However, sensitivity is given greater significance than precision in the case of the positive class, the stressed state. It is preferable to optimize the value of sensitivity rather than precision, which entails minimizing FN to detect the detrimental effects of stress as far as possible. As the data are balanced, the metric is of no great interest, especially when its value for the basal state and stressed state classes is very high, \(\sim\)0.96 and \(\sim\)0.97, respectively, thus confirming the model's goodness. [PERSON]'s kappa coefficient presumes to be more notorious than accuracy when faced with unbalanced data, contrary to what happens in our work. However, it always helps to corroborate the model's reliability with its estimation.