# Efficient Sleep-Wake Cycle Staging via Phase-Amplitude Coupling Pattern Classification
## 4 Discussion
Conversely, if users are more interested in detecting only majority classes (e.g., SWS), or if specificity is much more important than any other criteria, future users can safely adopt strategies requiring training on a small subset of the data. It is important to highlight that the electrographic data used in this study are very homogeneous, once they were collected using the very same recording parameters, with the same electrophysiology setup and experimental protocol. Although not tested here, it is very plausible that changes in these factors between the training and testing datasets may strongly impact performance, yielding misclassifications. Particularly, it is expected that the type and anatomical position of electrodes will have a major influence in the PAC values captured, as they will be able to or not properly capture important oscillatory content related to the SWC. For instance, detection of the REM stage in rats by the usage of spectral state maps is heavily influenced by the presence or not of electrodes in the hippocampus [16] due to the important hippocampal theta oscillation. In the same vein, another aspect of major importance may be animal species and, hence, brain functional anatomy. Thus, in our understanding, a network trained in one experiment should never be used to classify data from a different one. Furthermore, and given the small differences between using a half or full comodulogram, new applications of this approach may consider using the full spectrum to avoid the risk of not capturing important cross-frequency couplings that did not matter here. Finally, the performance of the network may also depend on the quality and consistency of the recordings across animals and days. For instance, if the signal quality decays or varies too much as the days go by, as usually happens in very long experiments, it is expected that the classification will fail. On the other hand, it is notable that the high values of the performance metrics in this study were obtained from single-channel electrocorticogram recordings only (we did not use the EMG signals available in the database). This represents a simplified experimental protocol for the surgical implant of electrodes and recordings. Thus, if problems are expected to happen, experimenters can overcome them by adopting more robust recording strategies, which include EMG and/or multiple channels of electroencephalographic recordings. This is evidence that the approach may work well for practical purposes in neuroscientific investigation. In our understanding, the good overall performance of the model corroborates our central argument that a straightforward network can efficiently classify SWC stages if the input data contain relevant neurobiological information. The fact that a shallow network, as the one implemented here, is enough has intrinsic technical and scientific value by itself. Yet, it is important to recognize that the model proposed here could be improved even without the need for deep learning architectures nor incurring considerable additional computational costs. Particularly, it seems that the network performance was impacted to some extent by not properly dealing with imbalanced data. In fact, the F1-scores were lower for the minority class REM stage, especially in the most demanding extrapolation strategy (Table 5; F1 around 0.77). Curiously, while training with the best animal (with the highest AUC values) showed good precision (0.923) and moderate sensitivity (0.668), the worst animal was the other way around, with moderate precision (0.649) but good recall (0.952). From the point of view of the F1-score, they were equivalent (0.775 and 0.772). Thus, it is plausible that the adoption of additional steps aimed at mitigating data imbalances (e.g., resampling or cost-sensitive learning) might yield improved performance. From the point of view of sleep neurobiology though, REM is usually considered the most \"elusive\" of the stages and different SWC staging methods can fail in properly detecting it.