# ML-Based Pain Recognition Model Using Mixup Data Augmentation
## 3 Methodology
### ML Pain Recognition Model Design  
The given dataset is multimodal, where three physiological signals were captured, namely, EDA, ECG, and EMG. Based on the experiments and analysis from the authors of [10], using an EDA signal significantly outperforms both EMG and ECG in all classification experiments. Hence, as part of the current work, the EDA signal was considered for the classification task because it was proven to be the best-performing single modality [10]. Furthermore, two approaches were implemented. One was a conventional machine learning approach which was built upon a set of carefully engineered features that were manually extracted from the raw EDA signal. The extracted features were subsequently utilized to fine-tune an inference model, essentially categorizing them as either indicative of pain or not, and the extracted features were not augmented using mixup. The second approach was based on data augmentation using mixup before training the inference model. The performance of both these models was then compared. The classifier used here was a binary classifier and the type of learning employed was supervised learning, which means that the training was supervised with labels. Since this was a binary classification, two labels were used, BL1 (baseline temperature), representing no pain, and PA4 (pain tolerance temperature), representing pain. In this experiment, only BL1 and PA4 were considered, again based on the observations by the authors in [10], wherein the discrimination between the baseline temperature BL1 and the pain threshold temperature PA1, as well as the two intermediate temperatures PA2 and PA3, constituted a very difficult classification and the modalities employed were unable to perform classification successfully. On the other hand, classification using BL1 vs. PA4 as well as PA1 and PA4 yielded successful results, as mentioned by the authors in [10]. We used a support vector machine (SVM) as a classifier with a linear kernel for the classification of pain vs. no-pain states. SVMs are well suited to binary classification tasks because they maximize the margin between classes, providing a robust decision boundary even when features overlap slightly, which often is the case for EDA signals. The kernel that was used is a linear kernel, which was selected because of its computational efficiency and interpretability. A linear decision boundary was deemed sufficient to separate the classes, given the 36-dimensional feature space derived from the EDA signal. Further, linear kernels reduce the risk of overfitting in high-dimensional spaces, where a nonlinear kernel might be prone to fitting noise in the data. The models were trained and tested on a standard CPU, without the need for specialized hardware such as GPUs. This choice of hardware further emphasizes the efficiency of the linear kernel in the binary classification task, also suggesting the feasibility of deploying such a model in resource-constrained environments even with relatively large datasets. ML-Based Pain Recognition Model With and Without Mixup  
Figure 6 shows the workflow pipeline of the pain recognition model incorporated using machine learning. The functionality of the model can be illustrated in a few simple steps:  
1. Physiological signals are captured from the subjects, following the methodology outlined in Section 3.1 utilizing the BioVid Heat Pain Database. 2. EDA is preprocessed and further decomposed into EDA cleaned, EDA phasic, and EDA tonic. The model is designed by making use of EDA signal only, aligning with the findings of [10] given its efficiency and success in pain detection. 3. From each signal, twelve statistical features are extracted, resulting in thirty-six features. 4. In the case of an ML model without mixup, the thirty-six features extracted using the above step are used to train a conventional machine learning classifier. In our study, a support vector machine (SVM) is used, which then categorizes the data into either pain or no-pain states. 5.