In his blog post a few weeks ago Alejandro Riera talked about characterizing stress based on EEG. The post presented the generation of EEG features based on ratios and differences at particular frequency bands. I would like to comment today on the second part of the story, that goes from such features to the classification of activities upon the stress level. This can have applications like the one recently presented. The general framework was somehow introduced by Anton Albajes-Eizagirre in his post on machine learning applied to affective computing. He presented the general framework, so I would like to comment on the experimental results we have obtained with a particular dataset by using data fusion. The work can be found in detail in our paper Electro-Physiological Data Fusion for Stress Detection .
The multimodal setting for stress characterization
The purpose of the system is to fuse the data of separate information channels, namely EEG, and EMG data. We achieve the classification of stress-related tasks, e.g. mathematical computation, a fake blood extraction, vs tasks not related to stress, e.g. relaxing, reading. The idea is that by using these two electrophysiological modalities we would be able to determine if a subject is suffering from stress. We extract different features from the two modalities and then apply fusion operators in order to characterize the stress level of the task. We take into account the EEG channels reported in the literature to be the most related with valence and arousal, namely those in the frontal part. Therefore we select the pairs F3-F4, and F7-F8. We computed here the alpha asymmetry, and the alpha-beta ratios, so that we have 6 EEG-based features. Moreover, we take into account the EMG energy on the zygomatic and the corrugator facial muscles. Facial EMG is known to be a good mean to monitor facial expressions and therefore emotional characterization. This gives us a system based on 8 features delivered each second with an analysis window of 2 seconds length.
Data Fusion delivering a stress marker
After normalizing the time-dependent features in the interval [0,1], we deliver them to a fusion operator. We select for this implementation the so-called Sugeno Fuzzy Integral. This is a generalization of the average based on the utilization of max and min operators. The result of the fusion operation is a real number in the interval [0,1], which corresponds to the score of the multimodal data being generated during a stress task, i.e. equivalent to a stress marker suffered by the subject when realizing the task. This score is the output of our system.
How good are we at detecting stressful tasks?
For the performance evaluation we use a 5-cross-fold validation procedure. Therefore we split the data in 5 subsets, which means we are using 80% of data for training and 20% for test and repeating this procedure 5 times. Finally we compute the True Positive (TPR) and the False Positive Rates (FPR) by using the stress task epochs as the positive class to detect. The TPR is the percentage of right detected stressful tasks. The FPR is the percentage of relaxing tasks that are wrongly detected as stressful ones. Since the result of the fusion operator is a real-valued number, we have to apply a threshold in order to make a decision. The threshold determines how many right decisions and errors we are making as expressed by the measures TPR and FPR. For different values of the decision threshold you obtain different TPR-FPR values and you can plot them therefore in a graph as you can see in the attached Figure.
We test the system with data from 12 subjects (denoted as S1 to S12). As can be observed we obtain excellent performance for 3 out of 12 subjects (with right decisions in 97% of the tasks). The minimal achieved performance is around 83% of the tasks for 2 of the subjects. The average right detection is done in 91.7% of the tasks. This is in summary an excellent performance for a real-time system delivering a decision every 2 seconds as the one we have implemented. Can you imagine your computer telling you to take a rest when it detects that you are getting too stressed?