4.1.7. Dimensionality Reduction

We applied correlation-based feature selection (CBFS) technique which is available in the Weka machine learning package for combined signal [56]. The CBFS method removes the features that are less correlated with the output class. For every model, we selected the ten most important features. This method is applied for MLP, RF, kNN and LDA. In order to create an SVM based model, we applied PCA based dimensionality reduction where the covered variance is selected as 0.95 (the default setting).

### 4.1.8. Insights from the Feature Selection Process

The CBFS method computes the correlation of features with the ground truth label of the stress level. Insights about the contribution of the features to the stress detection performance can be obtained from Figures 1 and 2. Three of the best features (over 0.15 correlation) are frequency domain features. These features are high, low and very-low frequency components of the HRV signal (see Figure 1). When we examine the EDA features, peaks per 100 s feature are the most important and distinctive feature by far. Since the EDA signal is distorted under the influence of the stimuli, the number of peaks and valleys increases. Lastly, when the acceleration signal is investigated, the most discriminative feature is mean acceleration in the *z*-axis (see Figure 2b). This could be due to the nature of hand and body gestures which are caused by stressed situations.

**Figure 1.** Top-ranking features selected for the HRV signal.

### *4.2. Relaxation Method Suggestion by Analyzing the Physical Activity-Based Context*

Context is a broad term that could contain different types of information such as calendars, activity type, location and activity intensity. Physical activity intensity could be used to infer contextual information. In more restricted environments such as office, classrooms, public transportation and physical activity intensity could be low, whereas, in outdoor environments, physical activity intensity could increase. Therefore, an appropriate relaxation method will change according to the context of individuals.

For calculating physical activity intensity, we used the EDAExplorer tool [41]. The stillness metric is used for this purpose. It is the percentage of periods in which the person is still or motionless. Total acceleration must be less than a threshold (default is 0.1 [41]) for 95 percent of a minute in order for this minute to count as still [41]. Then, the ratio of still minutes in a session can be calculated. For the ratio of still minutes in a session, we labeled sessions below 20% as still, above 20% as active and suggested relaxation method accordingly (see Figure 3).

**Figure 3.** The whole system diagram is depicted. When a high stress level is experienced, by analyzing the physical activity based context, the system suggests the most appropriate reduction method.

### *4.3. Description of the Data Collection Procedure*

The proposed stress level monitoring mechanism, for real-life settings, was evaluated during an eight day Marie Skłodowska-Curie Innovative Training Network (ITN) training event in Istanbul, Turkey, for the AffecTech project. AffecTech is a program funded by Horizon 2020 (H2020) framework established by the European Commission. The AffecTech project is an international collaborative research network involving 15 PhD students (early stage researchers (ESR)) with the aim of developing low-cost effective wearable

technologies for individuals who experience affective disorders (for example, depression, anxiety and bipolar disorder).

The eight-day training event included workshops, lectures and training with clearly defined tasks and activities to ensure that the ESR had developed the required skills, knowledge and values outline prior to the training event. At the end of the eight-day training, ESRs were required to deliver a presentation about their PhD work to two evaluators from the European Union where they received feedback about their progress (see Figure 4 for raw physiological signals at the start of the presentation). For studying the effects of emotion regulation on stress, yoga, guided mindfulness and mobile-based mindfulness, sessions were held by a certified instructor.

**Figure 4.** Sample data belong to a presentation session. The increase in EDA, ST and IBI could be observed when the subject started the presentation.

During the training, physiological and questionnaire data were collected from the 16 ESR participants (9 men, mean age 28); 15 ESRs and one of the AffecTech project academics, all of whom gave informed consent to participate in the study. Participants were from different countries with diverse nationalities (two from Iran, two from Spain, two from Italy, one from Argentina, one from Pakistan, one from China, one from Switzerland, one from Belarus, one from France, one from England, one from Barbados, one from Turkey and one from Bulgaria). Due to the fault of one of the Empatica E4 devices, it was not possible to include data from one participant. The remaining 15 participants completed all stages of the study successfully.

During the eight days of training and presentations, psychophysiological data were collected from 16 participants during the training event from Empatica E4 smart band while they are awake. For studying the effects of emotion regulation on stress, yoga, guided mindfulness and mobile-based mindfulness sessions were held by a certified instructor. The timeline of the event is shown in Figure 5.

**Figure 5.** Time-line depicting eight days of the training event. Presentations, relaxations and lectures are highlighted.
