## 2 Materials and Methods
### Performance Evaluation  
In order to evaluate the effect of the utilized EEG channels and CWD-based time-frequency features on the classification performance of our proposed pain detection approach, we have developed two performance evaluation procedures: the channel- and feature-based evaluation procedures. The channel-based evaluation procedure investigates the effect of selecting a subset of the EEG channels on the accuracy of detecting pain, while the feature-based evaluation procedure investigates the effect of selecting a subset of the extracted CWD-based time-frequency features on the accuracy of detecting pain. In particular, for the channel-based evaluation procedure, we start by computing the classification performance of our proposed approach using all the EEG channels and all the CWD-based time-frequency features. After that, we apply an iterative channel reduction procedure to specify the minimum number of EEG channels required to accurately detect pain. The number of iterations of the channel reduction procedure is equal to the number of EEG channels considered in this study, which is equal to 14 channels. For each iteration, the average classification performance is computed over all subjects after removing one of the EEG channels. Then, the EEG channel that produced the highest average classification performance after its elimination is removed from subsequent iterations. Similarly, for the feature-based evaluation procedure, we applied an iterative feature reduction procedure to specify the minimum number of time-frequency features required to accurately detect pain. The number of iterations of the feature reduction procedure is equal to the number of time-frequency features considered in this study, which is equal to 12. For each iteration, the average classification performance is computed over all subjects after removing one of the CWD-based time-frequency features. Then, the time-frequency feature that produced the highest average classification performance after its elimination is removed from subsequent iterations. It is worth noting that the iterative reduction procedure, which is employed in the current channel- and feature-based performance evaluation analyses, has been successfully employed in several previous studies [31; 32] as an alternative approach to the computationally-intensive exhaustive search procedure [33; 34]. In addition, we compare the classification performance obtained using the CWD-based time-frequency features presented in the current study with the classification performances obtained using the features presented in the works of the authors of [8; 9]. In particular, [PERSON] et al. [8] utilizedthe peak alpha frequency, which represents the frequency value associated with the highest power spectral density (PSD) within the alpha frequency band, as a feature to characterize the tonic pain in the EEG signals. To compare the classification performance obtained using our proposed CWD-based time-frequency features with the classification performance obtained using the feature presented in the study by [PERSON] et al. [8], we applied the sliding window approach described in Section 2.4 to the EEG signals employed in the current study. After that, we computed the peak alpha frequency feature for each EEG segment. The features extracted from the EEG segments associated with a particular window position are grouped to form a feature vector. Then, for each subject, we train a SVM classifier to classify the feature vectors into one of two pain-related classes--the no-pain class and pain class--using the cross-validation procedure described in Section 2.6. Similarly, [PERSON] and [PERSON] [9] utilized two features--the normalized PSD of the alpha and beta frequency bands--to characterize the tonic pain in the EEG signals.