# ML-Based Pain Recognition Model Using Mixup Data Augmentation
## 4 Results
### Wilcoxon-Signed Rank Test  
The Wilcoxon signed-rank test is a non-parametric hypothesis test that compares the median of two paired groups and tells us if they are identically distributed or not. The Wilcoxon signed-rank test is also known as the Wilcoxon matched-pair test. It can be used when the differences between the pairs of data are non-normally distributed. This test is used for comparing two machine learning models. The working of a Wilcoxon test can be briefly explained in a few steps:  
* The null (h0) and alternate (h1) hypothesis are determined. Null Hypothesis (h0): The median difference between the paired samples is zero, or there is no difference between the two related populations. Alternate Hypothesis (h1): The median difference between the paired samples is not zero, indicating a difference between the two related populations.
* A difference (D) is calculated between each pair of observations.
* The pairs with zero differences are discarded.  
\begin{table}
\begin{tabular}{l c} \hline \hline
**Method** & **SVM** \\ \hline No mixup & 74.61\% \\ Mixup (\(\alpha\) = 0.1) & 75.87\% \\ Mixup (\(\alpha\) = 0.2) & 75.04\% \\ Mixup (\(\alpha\) = 0.3) & 75.61\% \\ Mixup (\(\alpha\) = 0.4) & 75.12\% \\ \hline \hline \end{tabular}
\end{table}
Table 1: Performance comparison of the SVM with and without mixup for the binary classification task BL1 vs. PA4 on EDA signals from the BioVid database (Part A).  
* We find out the absolute differences and assign ranks to them starting from the lowest to the highest.
* The sum of ranks for positive and negative differences is calculated separately.
* The smallest sum of ranks (W) is used as the test statistic.
* The obtained value W is compared with the critical value from the Wilcoxon signed-rank distribution table or the \(p\)-value is calculated.  
The obtained \(p\)-value is compared with a so-called significance level, which is typically set to 0.05. The null hypothesis is rejected if the \(p\)-value is less than the significance level, and we can conclude that there is a statistically significant difference between the two models/populations. On the contrary, if the obtained \(p\)-value is greater than the significance level, this is an indication that there is no statistically significant difference between the populations/models. In our experiment, the \(p\)-values were less than 0.05 for all values of \(\alpha\in[0.1,0.4]\), indicating that the ML models incorporating mixup performed better than the ones without mixup.  
As part of our experiment, we compared the machine learning models with and without mixup by using the Wilcoxon signed-rank test, and the \(p\)-value was calculated for two lists of accuracy scores: one obtained by performing an LOSOCV on a machine learning model without mixup and the other obtained by performing an LOSOCV on a machine learning model with mixup. The \(p\)-value obtained was compared with a significance value and it was much smaller than 0.05, indicating statistical significance, which means that the null hypothesis could be rejected, hence proving that the machine learning model with mixup performed better than the model without mixup.