Using EEG-based machine learning to classify the accuracy of pain intensity induced by restricting blood flow in the legs while walking

Machine Learning


Participants

This experiment included 25 healthy subjects (22 men and three women, age 33.2 ± 2.0). Inclusion criteria required participants to report no pain at the time of the experiment, not taking medication (including painkillers), and had no history of developmental delays or cognitive impairment. All participants received a detailed explanation of this experimental protocol. This was approved by the Institutional Review Committee (No. 22187) of Osaka University Hospital. All research procedures were carried out in accordance with relevant guidelines and regulations, including the Declaration of Helsinki. Written informed consent was obtained from all participants prior to participation.

Experimental Pain Modalities

Tourn-induced pain model was used as an experimental pain stimulation. This was induced by restricting blood flow in the legs during walking. Although it has been reported that pain intensity due to tourniquet applications increases over time15the following experiments were conducted to investigate whether this function persisted during walking. Each participant walked with a tourniquet of air wrapped around both feet. To minimize noise during walking, participants were instructed to limit head and neck movements as much as possible during brain wave measurements and maintain a stable pace of 80 steps per minute. The walking task was performed on an indoor track about 15 m in circumference. Initially, they walked for 2 min at tourniquet pressure of 0 mmHg (Task 0). They then continued walking, inducing sufficient lower limb ischemia while the pressure in the tourniquet increased and maintained at 200-250 mmHg. Painful walking was performed for a total of 8 minutes and divided into four 2-minute segments labeled tasks 1-4. Tournique pressure was checked after each task and adjusted to remain within the specified range (Figure 1).

Figure 1
Figure 1

Experimental protocol for EEG measurements. Participants walked with air tourniquets wrapped around both feet. They first walked for 2 min with tourniquet pressure set to 0 mmHg (Task 0). They continued walking as the tourniquet pressure gradually increased and was maintained between 200 and 250 mmHg. They walked for a total of 8 minutes under these painful conditions and were divided into four 2-minute segments (tasks 1-4). Tournique pressure was checked after each segment and adjusted to remain within the specified ranges as needed. The recorded EEGs at the very end of each task were analyzed.

Pain evaluation

The intensity of pain for each task was assessed using NRS immediately after completion of each task. The NRS ranges from 0 (no pain) (the worst pain imaginary).

EEG recording

Brain activity was recorded using a patch-type EEG device (HARU2; PGV, Tokyo, Japan) with three electrodes placed on the forehead (L: left, Z: center, R: right), and a reference electrode placed on the mastoid behind the left ear was recorded. This device uses low noise electrode material16and both the electrode and electrode base are flexible, allowing for a safe and comfortable fit on the forehead. Additionally, the wired connection between the electrodes and the EEG unit is minimized, and wireless signal transmission helps reduce motion artifacts. The EEG signal was sampled at 250 Hz. The last final EEG data in the second half of each 2-minute task (tasks 0-4) were analyzed and labeled EEG0-4.

Machine learning was employed to assess ACCs classifying pain levels during exercise. Three different classification approaches were implemented. In the first scheme, “no pain” and “worst pain” classes were compared to determine whether EEG could determine whether participants had pain or not. The second approach included three levels of classification (“no pain”, “moderate pain” and “worst pain”) to assess whether pain levels could be categorized into different stages. The third approach aims for a more detailed classification, dividing the pain level into five categories: “Painless”, “Mild Pain”, “Medium Pain”, “Severe Pain”, “Severe Pain”, and “Worst Pain”). A summary of the classification schemes examined is shown in Table 1.

Table 1 Definitions of classification schemes and class labels.

EEG pretreatment

Filtering Process

Brain wave pretreatment involves applying bandpass filters (0.5-90 Hz) and blink artifact filters using wavelet transform17. Additionally, a threshold filter (400 µV) was applied to remove motion artifacts.

Frequency analysis

Cleaned EEG data were segmented into 2-s epochs using a Hamming window with 50% overlap. For each epoch, the frequency power spectra were calculated using fast Fourier transform (FFT) for the following bands: Theta (4–8 Hz), Alpha (8–13 Hz, including low alpha [8–10 Hz]Middle Alpha [10–12 Hz]and high alpha [12–13 Hz]), beta (13-26 Hz including low beta [13–18 Hz] And high beta [18–26 Hz]and gamma (26-90 Hz).

Metric called BrainRate (BR)18 It was calculated again. BR reflects the spectral center of the centroid and shows relative changes across the frequency band. BR was calculated using the following Eq: (1):

$$ brainrate~ \left({br}\right)=~ \frac {{\mathop \sum \nolimits _{{i=1}}^{l} \left({fre {q_i}*powe {r_i}}\righ \nolimits _{{i=1}}^{l} powe {r_i}}} $$

(1)

In this equation, \(\:{freq} _{i} \) It shows the center frequency of the ith frequency bin, \(\:{power} _{i} \)It represents the spectral power at that frequency. \(\:l \) The total number of bins spanning the frequency range of 0.5 to 90 Hz. This measurement provides a compact representation of the frequency distribution of EEG signals. Here, higher brain plane values indicate the superiority of higher frequency activity, and lower values indicate stronger presence of lower frequencies.

Furthermore, the obtained feature values were corrected for individual differences using Z-score normalization. Each function \(\:{x} _{i} \)Eq. (2):

$${x_{iz}} =~\frac {{x_i} – {x_{mean}}}} {{{x_{std}}}}}}}}}

(2)

here, \(\:{x} _{average} \) and \(\:{x} _{std} \) It represents the mean and standard deviation of each subject and the features used for each task. For example, for the three classification, EEG0, EEG2, and EEG4 are used. therefore, \(\:{x} _{average} \) and \(\:{x} _{std} \) It is calculated as the mean and standard deviation of features from EEG0, EEG2, and EEG4 for each subject. This centering process explains individual differences and facilitates comparisons between datasets. For each subject and task, the 1-second frequency power spectra obtained through the windowing process were summed and averaged to derive feature values.

Data analysis and statistics

Model performance was assessed using 5x cross-validation per subject. Participants were divided into five different groups. One group served as a test set, and the remaining four were used as a training set in each iteration. This process was repeated five times, allowing each group to be used once as a test data set. Performance metrics obtained from five iterations were averaged to determine the final performance metrics for the model. Three machine learning algorithms were evaluated in this process: Random Forest (RF), Extreme Gradient Boost (xgboost), and Optical Gradient Boost Machine (LightGBM). These three algorithms were chosen because they were applied using the same preprocessing method. This approach eliminates bias due to differences in pre-processing and ensures fair comparisons between models. The algorithm with the highest classification accuracy was chosen as the final model. Classification performance was evaluated using a confusion matrix containing the following equation: (3) – (5):

$$quarchaty\left({acc}\right)=~\frac {{tp+tn}} {{tp+fn+tn+~fp}} $$

(3)

$$ precision =~\frac {{tp}} {{tp+~fp}} $$

(4)

$$ recall = \frac {{tp}} {{tp+fn}} $$

(5)

TP, TN, FP, and FN represent true positives, true negatives, false positives, and false negatives, respectively.

Statistical analysis

All data were analyzed using IBM SPSS statistics version 27.0 (IBM Corp., Armonk, NY) and presented as mean ± SDS. Statistical analyses were performed using one-way analysis of variance (ANOVA) to assess differences between groups. For post hoc multiple comparisons, Bonferroni correction was applied to identify significant differences between groups. Important levels of p<0.05 was considered statistically significant.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *