Keywords

1 Introduction

The stress consists of body response to some situations, and the physiological signs are a source for the identification of this occurrence. Some approaches, such as the Biofeedback [32], consider this aspect to generate effective patient interventions. The biofeedback approach is based on the organism’s response and its physiological processes, which are measured through body-driven sensors, further stored and processed by computer applications. Therefore, it allows for awareness of emotional states and training for the voluntary control of physiological and emotional responses.

In recent years, improvements in wearable sensors have presented the possibility of using these devices as sources of data to monitor the user’s physiological state. Most of these wearable sensors consist of low-cost devices that provide good quality signals [4, 6, 12]. Consequently, it can generate data utilized as source material to Machine Learning approaches aiming to model and predict these stress states [1, 7, 8]. As a related element, the wide-spread use of mobile devices and their capabilities presents the possibility to collect, process and integrate those physiological signs with more elaborated applications. The physiological data provided by the sensors can be collected on an online basis by mobile devices. In contrast, these devices can support applications to detect specific states and generate interventions to be followed by the users [9,10,11].

Nevertheless, some critical questions associated with this context are the focus of further research. The physiological wearable sensor data acquisition is a very dynamic field, continually proposing new sensors and improving its capabilities. Some research can be observed in the data analysis and data fusion models, due to the number of possibilities to process the features and integrate the acquired data [9, 04, 11]. Another question of interest is how to ensure the correct identification of some specific data pattern associated with a psychologic state [14]. Finally, there are few works dedicated to evaluating the complete cycle of Biofeedback comprehensively, which comprise using the wearable devices, applying Machine Learning patterns detection algorithms, generating the psychologic intervention, besides monitoring its effects and recording the history of events [9, 15]. Several works were developed considering just one sensor or a few sensors [1,2,3, 5, 30]. These works, in significant part, do not broadly address the investigation of using a group of different biosignals compositions to identify stress patterns. Papers do not bring enough details on the data acquisition protocol, which is a necessity to make clear the annotation procedures adopted [12, 20, 23].

As outlined above, he literature review shows, that wearables sensors’ use to acquire physiological signs as a source to stress patterns identification is still a critical investigation subject. Few studies investigate the effect of combining several different signals and the implications of the data acquisition procedures. Besides, this is a growing area, and there are no standardized and broadly used benchmarking datasets [11, 31]. Our work intends to address these two shortcomings. Therefore, this involves investigating the integration of data obtained from HFV, EDA, EMG to detect stress patterns, considering a new experimental protocol to data acquisition proposed by Psychology researches. The data acquisition involves the Trier Social Stress Test, wearable sensor monitoring, cortisol markers acquisition, and complementary stress perception instruments. Besides that, the generated dataset will be available to broad and open use. It was evaluated using different machine learning classifiers considering the obtained annotated data and exploring different physiological features and their combinations.

The main contributions of this article are: a) Present an experimental protocol to data acquisition regarding stress using the standard TSST protocol and complements with wearable sensors and additional stress perception elements, such as personal questionnaires. b) Investigate a broad set of features and signs to evaluate classification results with a well-known feature set and machine learning classification methods; c) Make available a new dataset, as a publicly available resource. This dataset comprises all the data acquired from the experiments and is designed to promote further research comparison.

2 Background

Stress is a physiological response to internal or external stimuli triggered by the nervous system, particularly by the sympathetic nervous system. The primary physiological known responses are accountable for a broad set of reactions. Some examples are sweat, gastrointestinal discomfort or pains in the stomach, allergies, heart palpitations, altered blood pressure, high cortisol, pupil dilation, the blink of the eye increasing as anxiety levels increase.

Derived from psychophysiology and influenced by different areas, such as behavioral therapy, behavioral medicine, stress intervention research and strategies, biomedical engineering, among others, the Biofeedback [32]. Biofeedback is the organism’s response (physiological processes), measured through body-allocated sensors and sent to a base (computer program or application), which allows training for the voluntary control of physiological and emotional responses.

The study of stress is essential to improve understanding of the mechanisms involved and to achieve scientific and technological advances concerning its evaluation and intervention. However, reliable testing, which is capable of generating acute stress in laboratory situations, is necessary to be able to study it, so that there may be experimental control, a safe environment for the participants and generate valid scientific results [34].

Currently, TSST is recognized as the gold standard protocol for stress experiments. There are different adaptations of this protocol, including group and virtual reality options, and adaptations for different age groups [34]. The standard TSST protocol, for adult application in person, consists of three minutes of preparation for a speech, where the participant introduces himself, simulating a job interview. This presentation lasts five minutes, and the last task consists of mental arithmetic exercises, also for five minutes, in front of evaluators (for more details, see the methodology section). The total protocol time is 13 [35].

The responses of elevation of cortisol and HPA axis levels in the TSST application are higher in the morning due to the circadian rhythm. However, both morning and afternoon applications are reliable [35]. TSST can generate robust responses to stress, which are perceptible through psychological, physiological, and biological measures.

3 Related Work

In recent years, many studies have been conducted to detect stress based on wearables measured biosignals and also towards the evaluation of the best psychological intervention to deal with this situation. Among the studies regarding stress detection, the overall focus observed involves choosing a few physiological aspects and the choice of a respective sensor to measure it. When considering the works with the focus on support application for the regulation of anxiety or stress and use of biofeedback, in general, we can observe few studies incorporating a broad set of signs as the source of the stress indication. In the case of using the wearable sensors to online detection of such patterns, then the data preprocessing plays a fundamental role, due to the time spent on this activity. Below are described related works organized by its primary focus. The first part with a focus on data acquisition, preprocessing, and classification. The second with a focus on the online use of wearables as biofeedback support to psychological intervention.

Choi and Osuna [1] describe an approach to detecting mental stress using unobtrusive wearable sensors. It follows the heart rate variability only, using a nonlinear system identification technique known as principal dynamic modes, with a success rate varying from 83% to 69% depending on the experiment carried out. The skin conductance and the possibilities of emotional states were investigated in [26]. Betti et al. [12] describes an experiment using three biosignals (ECG, EDA, EEG) to generate classification models and correlated this with the cortisol level, which is considered an objective and reliable stress marker. The Support Vector Machine (SVM) classification algorithm was used and the results obtained provided 86% accuracy. The data was collected from 15 participants, and 15 data features were analyzed, together with a correlation with cortisol information.

Some works are dedicated to a specific context, such as the truck drivers’ work journey, as can be seen in [5], which describes an experiment for data acquisition in real situations. In this work, a deep learning approach was used, compared with a baseline feedforward Artificial neural network. Another specific context, the construction workers’ daily routine, is studied in [10], with the selection of EEG signals and Online Multi-Task Learning (OMTL) algorithms. Schmidt et al. [11] describes Wearable Stress and Affect Detection (WESAD), one public dataset integrating several sensors signals and the use of a set of classifiers to identify stress patterns. The data acquisition also integrates the emotional aspect, along with stress. The precision of 93% was obtained with classifiers experiments. The work of Wijman [13] describes the use of EMG signals to identify stress. An experiment with 22 participants was conducted, and both the wearables signals and questionnaires were considered.

In some cases, experiments were made to integrate both sensors acquired signals with other sources, such as smartphone-based activity. Sano [7] performed integration of sensors signals such as EDA while using smartphones to use social networks, read the news, or other related activities. Similarly, [8] approach is dedicated to assessing cognitive problems using the EDA sensor signal and the data obtained with pen movements of the patient while writing with a digital pen able to record some aspects of the writing movements. Paredes [9] explores the design of a smartphone app to interact with users and suggest interventions when detected the necessity, due to a stress situation.

Some works with the main focus on dataset construction. [6] describes the construction of a dataset regarding human movement identification. The wearable approach is one of the possibilities to collect and process the necessary data to identify daily activities. In the case of stress identification, the complementary information regarding human movement can be of interest to support better quality stress patterns identification. Some of the normal daily physical activities will generate impacts on the physiological signals used in most stress patterns recognition approaches. Schmidt et al. [11] describe WESAD, one public dataset integrating several sensors’ signals and using a set of classifiers to identify stress patterns. The data acquisition also integrates the emotional aspect, along with stress. The precision of 93% was obtained with classifiers experiments.

Wijsman et al. [3] present a set of wearables sensors in an ambulatory context, dedicated to collecting data from patients for future analysis. Besides that, the experiment provided the opportunity to use a set of previously acquired stress patterns information, used to estimate a stress probability over time, with the wearable data signals online analysis. The primary objective of some works is to provide an integration of components that could support biosignals’ online analysis. In work presented by Attaran [4], we can observe an architecture dedicated to integrating the sensor signals acquisition and the processing, even with the dedicated support to execute the classification of the patterns in an online capacity. Therefore, the results can support wearable devices integration the sensors and the online processing, opening the possibility to several applications. Henriques et al. [14] main focus was to evaluate the positive effects of biofeedback software as a mechanism to reduce anxiety in a group of students. The main biosignal monitored, in this case, was the heart rate variability. Two pilot experiments consisting of four weeks each were designed to verify the effectiveness of this computer-based heart rate variability feedback system to help in reducing anxiety and negative mood in college students. Gaglioli et al. [15] describe the main features and preliminary evaluation of a free mobile platform for the self-management of psychological stress. The platform can provide guided relaxation techniques to the users, besides the possibility to show visual information regarding wearables sensors measures from the heart rate. The overall data set obtained during the platform’s use is available to the users, as well as the self-reports generated. Dilon et al. [16] describe an experiment using smartphones and games integrated with physiological signs sensors to help in stress reduction. The skin electrical conductance and the TSST test were used as data sources.

Some works are dedicated to analyzing the data generated by the usage of some mobile devices, such as the smartphone. Vildjiounaite et al. [17] described an experiment based on datasets generated by several kinds of use of the smartphone, manually annotated regarding the users’ perception of stress during the periods. This approach does not use any additional sensor and can only generate late reports on the identified situation. The opportunities identified in the context of health, with the support of new wearable sensors, communication, and integration possibilities have been described in recent works [24, 25]. Besides the opportunities to data acquisition and monitoring in real-time and with good precision, using Machine Learning approaches to classify these data regarding specific stress, or emotion patterns are promising [27,28,29]. Particular attention in increasing on the design of systems based on wearables sensors capabilities and in the flexibility and integration aspects [31].

4 Materials and Methods

In this section, we describe the experimental study protocol used to acquire the annotated data from wearables sensors in a session using the TSST protocol.

4.1 Experimental Study Protocol

This is a study with a quasi-experimental, single-group design with interrupted time series. This type of study can present a single group, but in this case, it performs several evaluations, with repeated measures, at different times. The quasi-experimental designs are less controlled than a simple experiment, usually having a control group, but do not present a random distribution of participants to the groups. Participants were selected by convenience. The research was disclosed to undergraduate and graduate students of a university in the metropolitan region. The courses with a high number of students, other than the health area, were selected.

Were excluded from the experiment, people with cardiac disease, psychiatric disorders, or other illness chronic self-reported. Were also excluded people who use psychoactive drugs or beta-blockers, who have consumed caffeine or other stimulants up to three hours before the study, having insomnia or other sleep problems, reported pain at the time of data collection, pregnant or lactating women, or who have passed (in the last 120 days) or are experiencing a severe stressor (e.g., family assault or severe illness). These criteria were stipulated to gain greater control over the experiment due to its influence on physiological stress and cortisol measurements. A total number of 71 participants were selected for the experiment.

The estimated total TSST [36] protocol time, involving pre-tests and post-tests, is 116 min. The experiment consists of the following steps. In step 1, Initial Evaluation, the participant answers the questionnaires to check the inclusion and exclusion criteria. Only participants who meet the requirements for the experiment are selected. In step 2, Habituation, the participant will take a rest time of twenty minutes before the pre-test. This rest helps avoid the influence of events before applying the test and establishes a safe baseline. In step 3, Pre-test, the sensors are allocated, a saliva sample is collected, and the psychological instruments are applied.

In step 4, Explanation of procedure and preparation, the researcher will deliver written and standardized instructions, explaining the activity that the subject will perform. The participant reads the instructions, and the researcher ensures that he understands the task specifications. Then it is sent to the room with the jurors, equipped as if it were a room of a company. The jury is trained to remain neutral during the experiment, not giving positive verbal or non-verbal feedback during the experiment for the subject. The researcher informs that the participant will speak in front of the microphone, with a marked point on the ground, at a distance of one to three meters from the jury table. A camera and a microphone will be used to record the participant. The researcher briefly presents the jurors the objective of the subject in his presentation, remembers the presentation will be recorded, and leaves the room. The participant then begins the preparation for the speech. The committee asks the subject to sit down with paper and pencil and prepare their presentation. The participant will have three minutes to prepare.

In step 5, Free speech presentation, after three minutes of preparation, the participant is requested to go to the marked point and start his speech, being informed that he can not use the notes. If he closes earlier than five minutes, the jurors warn him that he still has time and expect him to talk more. After five minutes, the jurors interrupt the subject and direct it to the next task. In step 6, Arithmetic task, the jurors request an arithmetic task in which the participant must subtract mentally and consecutively the number 17, beginning with 2023. He is asked to perform the calculation as quickly and correctly as possible. At times, the jurors interrupt and warn that the participant has made a mistake, requesting that he begin again. After five minutes, the task is terminated. In step 7, Post-test evaluation, the experimenter receives the subject outside the room for the post-test evaluations. Pre-test, initial response, peak, and stress recovery levels are verified.

In the step 8, Feedback and clarification, the investigator and jurors talk to the subject and clarify what the task was about. They should take this moment to thank for the participation, to resolve any discomfort, and to indicate the return of the data. In step 9, the Relaxation technique, a recording will be used with the guidelines on how to perform a relaxation technique. It will be used only breathing. The inspiratory-expiration time measure will be 10 s per complete cycle, with about six cycles per minute. Participants will be instructed to inhale for four seconds and expire for six seconds. Firstly, they will be guided and trained in the technique and, afterward, will perform the procedure with recording and pacer, in a standardized way for all participants. The physiological measures will be evaluated during the application of the technique, and, afterward, physiological, psychological, and biological measures will be repeated. In step 10, final post-test, some of the psychological instruments will be reapplied, saliva samples will be collected, and the sensors will still be picking up the physiological signals.

In Fig. 1, each of the mentioned steps is indicated regarding the duration of the task and the different kind of data collected.

Fig. 1.
figure 1

Overall view of the experimental protocol steps

The instruments applied for the evaluation of the sample are divided among instruments for inclusion or exclusion of the sample in the study; sociodemographic and health questionnaire; instruments for psychological data collection; physiological and; biological. The following is a description of the instruments for collecting additional data.

Some psychological data collection instruments used are commented. The Perceived Stress Scale (PSS) assesses cognitive aspects of stress perception, verifying the indices in which people assess situations in their context. The Inventory of State-Trait Anxiety Inventory (STAI) is used for the verification of anxiety symptoms. It has two scales, one that evaluates anxiety as a state, that is, a temporary situation, and another as a trait, referring to a more stable condition of presence or absence of anxiety during life. The Visual Analogue Scale (EVA) for stress presents in the form of a horizontal line of ten centimeters, enumerated in its extremities with the numbers zero (0) and ten (10), where 0 means “no stress” and 10 means “maximum stress”.

The instruments for collecting physiological data are diversified. The BeWell is composed by the following sensors of the BITalino Kit - (PLUX Wireless Biosignals). The Electrocardiogram (ECG) sensor, provides data on heart rate and heart rate variability. The Electrodermal activity (EDA) sensor allows the capture of the bioelectrical signals sent to the muscular fibers. The electromyography (EMG) sensor allows the data collection of the electrical activity of the sweat glands. Another instrument used was the Polar RS800CX Heart Rate Variability Monitor. This instrument uses a sensor that is attached to the chest by an elastic band. The data collected by the sensor are transmitted simultaneously to the Polar clock, allowing the transfer to a computer for analysis, generally performed in the Kubios HRV Software. The MindField Esense Skin Response: Measures the galvanic responses of the skin (electrodermal activity), and the electrical activity of the sweat glands can be verified. The sensors are placed in the fingers, using an application to verify the response emitted by the sensors.

The salivary dosage of the hormone cortisol is a non-invasive method, which does not require the presence of doctors or nurses for the collection. It is a practical and reliable method for obtaining cortisol analysis. However, it is necessary to take into account the different influences to which this measure is subject, such as the time of collection of the saliva sample, gender, use of stimulants, or medical conditions, which may influence the results obtained. Evaluations of weight and height measurements of each participant were performed for the analysis. Samples of saliva were collected by the participant himself, with the assistance and guidance of the team responsible for the project. The Elisa Kit for Salivary Cortisol from DRG Instruments was used, an enzymatic immunoassay kit to measure active free, solid-phase cortisol, based on the principle of competitive binding.

4.2 Data Acquisition

For the analysis of the physiological data, there was assistance from a specialist in the area. The heart rate variability data was computed through the root mean square of the successive differences (RMSSD) calculation, as it is indicated for HRV evaluations in research contexts.

The cortisol analyzes were carried out in the biology laboratory of the University of Vale do Rio dos Sinos. For this analysis, besides the authors, we counted on the collaboration of the Group of Advanced Studies in Health Psychology, with the support of the technicians of the laboratory of biology and supervision of teachers, who possess the necessary technical skills to carry out these analyses. The sociodemographic and psychological data, together with the cortisol analyzes and physiological responses, were registered to a Statistical Package for the Social Sciences (SPSS), version 25.0. The level of significance considered was 5% (p < 0.05).

For the development of the device for biosignal measures, we first verified similar applications developed in the area, performing a systematic review of scientific articles on the subject and searching non-systematically in app stores such as Google Play and Apple Store, not being found devices with the same characteristics. Some applications found in this line evaluate physiological signals and training in biofeedback in a specific and specific time or interventions in Cognitive-Behavior Therapy without the use of sensors for biofeedback.

The vast majority of applications found do not use sensors to obtain physiological responses, but offer intervention through relaxation techniques, for example. There are programs and applications of biofeedback for evaluating physiological signals, with possibilities of allocating sensors in different regions of the body. However, these devices usually use a single sensor, or when they use more, they are allocated separately in different regions of the body. To date, no applications have been found that present continuous, momentary, and automatic measurement characteristics with different sensors in a single wearable, offering empirically supported intervention, which is the final proposal of BeWell. Recently, studies are emerging in this direction, pointing out to be an area with promising results.

After performing these searches, the different types of biofeedback sensors were studied. They selected those that were reliable and were most used, with the possibility of integrating into a single wearable. From these surveys, three sensors were selected to obtain measurements: ECG, EDA, EMG. The ECG sensor is used for the collection of HR and HRV data through the electrical signals emitted by cells in the heart. This sensor allows the capture of these electrical signals and their transformation into numerical values (BITALINO, 2015a). Higher HRV indicates an ideal interaction between the sympathetic and parasympathetic nervous systems. There are different measures of HRV. We will use the RMSSD, because it is more appropriate for our study at the moment and because it is more used in research. The EDA sensor allows the capture of the bioelectrical signals from the motor control neurons in the brain, sent to the muscular fibers. These signals are translated into numerical values, enabling their analysis (BITALINO, 2015b). Electro-dermal activity, also known as galvanic skin response or skin conductance, refers to the ability of the skin to conduct electricity. Skin conductance is associated with the amount of moisture produced by eccrine sweat glands. This activity signals the sympathetic nervous system’s activation, which produces more sweat and increases the electrical conductivity of the skin, which can be detected by biofeedback sensors. Stress and SNS activation will be detected by the device, feedback on the functioning of the organism in this regard. Therefore, this kind of biofeedback is a way of measuring the activation of sweat glands in stress situations directly through electrical activity and indirectly. The EMG sensor allows the sweat glands’ electrical activity data collection. The transformation of these electrical changes into numerical data, make possible the analysis. Electromyographic biofeedback measures the emitted by the skin during contraction muscular. Motor control neurons signal to the muscle, and that signal is perceived by the biofeedback sensor, that the translates into numerical terms, different applicability to it. This process is related to the skeletal nervous system.

4.3 Methods for Analysis and Evaluation of the Acquired Data

The obtained data was analyzed and evaluated with the well-known data processing chain, consisting of the following main steps:

Preprocessing, segmentation, feature extraction, classification. The biosignals were acquired with BITalino [32]. The data was preprocessed with the support of the available API BioSPPY (https://biosppy.readthedocs.io/). The segmentation of the sensor signals was done considering a sliding window, with a window shift. For the biosignals the window size selected was NN seconds, according to arguments described by Kreibig [18]. The ECG signal was analyzed with Peak detection algorithms. From the peaks, computed the heart rate and statistical features such as mean and standard deviation. Also, the heart rate variability was obtained from the analysis of the location of the heartbeats. Also were computed the energy in different frequency bands. A detailed description of the HR and HRV analysis can be found in [19].

EDA signal is strongly associated with stressful situations since the Sympathetic Nervous System controls it. Due to its high sensitivity, a lowpass filter is used in several works using this biosignal [20, 21]. In our case, we used a lowpass filter of 5 Hz. With the result of this operation, the following statistical features were calculated: mean, standard deviation, dynamic range. We used skin conductance response (SCR) and skin conductance level (SCL). The first represents a short response for some stimulus. The second represents a baseline conductivity that can slowly vary. These two components were separated, and also additional information such as the number of peaks was computed using the reference provided by [22, 23]. The EMG features were processed, applying different filters. First was applied a lowpass filter (50 Hz) to the raw EMG signal. The result of the processed signal was segmented in 60-second windows. In these windows, the reassures of the different peaks, and the mean amplitude was measured. The second approach used a high pass filter and then segmented in windows of 5 s. The signal in these windows was used to calculate peak frequencies. The spectral energy was computed in bands ranging from 0 to 350 Hz. Details of this approach can be found in [13].

5 Experiments

This section presents details of the experiments conducted and the results obtained during the step of the process and analysis of data. The code developed is written in Python due to the libraries available in this programming language, specific for data analysis, machine learning, and filtering in biosignals. During the verification of data, it is possible to check that there is some absence in part of the signal during some periods. The main hypothesis for it happened is the loss of communication between the BITalino and the computer that stored the signal during the experiments. The reason assessed for this loss of communication must be a function of the signal acquisition rate, as verified in later tests with the wearable.

During the verification of the signs, each participant’s data is checked separately, for graphic analysis and signal average to check the plausibility of the data. The developed script reads the files with the raw data of each participant and a CSV file with the annotations of all participants in each step of the experiment. It is stored in dataframes of Pandas library, developed for data analysis. The raw data contains information from all wearable channels. To facilitate the process, the unused channels are discarded in the first step of the data processing. The script verifies the timestamp of the signals and combines all information compared with the data times for each step of the CSV file.

The whole experiment had its steps divided into six categories (Baseline, TSST, Arithmetic, Sensor Post-Test I, Sensor Post-Test II and No Category) and all data is categorized with base in the time for each step. In sequence, the dataframe is stored in other CSV file discarding the category “No Category”, because the data in this classification is about steps without relevant information about the experiment. This dataset is generated for participants to be used as training and testing data for the Machine Learning stage. The next step is data filtering, using the BioSSPY library. This library is developed for filtering and frequency analysis of biosignals. For example, Blood Volume Pulse (BVP), Electrocardiogram (ECG), Electromyograph (EMG), Electrodermal Activity (EDA), Electroencephalograph (EEG). This filtering is used the data classified as “Filtered”, for having a linear variability rate and all signals there is this kind of filtering.

Each participant has approximately 1.886.000 rows of data for the entire experiment. Due to the computational power limitation, it is not very easy to use a large amount of data to apply some Machine Learning technic. For this reason, a technique called windowing is applied. Windowing, also known as a window function, is a mathematical function with the objective to reduce the amount of data, it has as characteristic of retiring a part of data for each period, the removing of the information is done symmetrically. One way to reduce some eventual distortion, all data that removed is used to calculate the delta and is implemented in place of the data taken. In other words, if there are 1000 rows of data, implementing this technique using windowing with 10 times, the result is 100 rows of data are pure data, and 100 rows of data come from the average of the data removed, 200 lines of data remain. It is a great reducing, and as there is a large amount of data, this reduction is not noticeable.

Lastly, the script creates the dataset to apply the Machine Learning stage. During this step, the dataframe is converted and divided in two lists, the first list is the train dataframe, and this list has data about the signals. The other list is the test dataframe. Both lists have information about the class, which in this context is the “Category” applied in Machine Learning. After processing the data, these lists are stored in NumPy files, to facilitate data handling in any application.

5.1 Data Analysis

The Machine Learning stage used different combinations of the signals with the objective to determine what is the best method. The combinations used are only ECG, only EMG, only EDA, ECG and EMG, ECG and EDA, and EMG and EDA.

The library used to apply Machine Learning is the Scikit-Learn, an open-source library for Python, with modules of different algorithms. For each combination are applied six algorithms, the SVM with Linear Kernel, SVM with Radial Kernel, Decision Tree Classifier, Random Forest Classifier and Gaussian Naive Bayes. For each algorithm, four metrics are used to evaluate the results: accuracy, precision, recall, and F1 score (the combination of recall and precision). Based on this information, it is possible to determine the best method for implementing a system for detecting people’s status. During the experiments with the machine learning codes, it was implemented all process using two different windowing approaches, the first using 10 frames and the second with 100 frames.

The process performed with a windowing of 10 times, the code took considerably longer, about 30% more, than windowing 100 times. Most combinations did not return good results when applying most algorithms, and only the ECG signal presented some significant result. Regarding the metrics obtained, both presented results very close to one another. Comparing the metrics resulting from the different windowing performed during the Machine Learning process and all six combinations, the best context in precision was the combination of ECG and EMG.

With the results commented before, it is possible to verify no difference which justifies the use of smaller windowing. Another conclusion is that the EDA signal is not a good option to implement some artificial intelligence to determine the person’s status. All the metrics used in combination with this signal showed low accuracy and precision. In contrast, the EMG and ECG signal presented good responses, mainly using the algorithm Gaussian Naïve Bayes.

6 Conclusion

In this paper, we presented a new experimental protocol to acquire physiological data regarding stress situations, based on the well-known TSST protocol, improved with questionnaires for self-reports of the participants and physiological measures obtained with wearables sensors. During the graphical analysis of the participants’ signals with the signaled categories, it was evident that the TSST protocol fulfills the objective.

The protocol differentiates from previous works regarding the number of signals, evaluation of the combination, complement with questionnaires annotated with cortisol. This work is part of a broader effort to support online identification of the patterns, which is important to foster biofeedback applications. As a future improvement to this work, new machine learning experiments will be carried out using a larger volume of data and will also be implemented deep learning techniques.

An alternative is the standardization of the volume of data in each category, ensuring that there as much data in one stage as in another. As a suggestion for future works, it is recommended to perform new tests with the wearable reducing the sampling rate and monitoring the stability of the acquisition signals. Reducing the acquisition rate from 1 kHz to 100 Hz, the signal tends to have lower communication losses, but it is necessary to carry out validation.