## 2 Materials and Methods
### Description of Data  
Data were collected from 34 subjects in 166 experiments while they were in a sedentary state or performing PA such as running on a treadmill or using a stationary bike (Table 2). Six were healthy subjects and 28 were people with T1D. During these experiments, three APS states were implemented: no psychological stressors (labeled as non-stress), and inducement of mental stress or emotional anxiety. The experiments were approved by the Institutional Review Board of the university. In the non-stress state, participants watched neutral videos, listened to music, read books, or surfed the internet. Emotional anxiety stress inducement included watching videos of surgeries or car crashes, meeting with supervisors, driving a car, and solving test problems within an allotted time frame. Mental stress inducement included performing the Stroop test, IQ test, mental arithmetic (mental multiplication of two-digit numbers) or a mathematics exam, and puzzle games. These APS inducements are reported in the literature to reliably induce APS when implemented in a variety of studies [8; 9; 10; 11; 12; 13; 23; 24; 25; 26; 27; 28; 29; 30; 31]. Energy expenditure was measured by a portable indirect calorimetry system (COSMED K5, Rome, Italy) [32] and compared across the non-stress, emotional anxiety, and mental stress experiments to ensure the PA was consistent across the experiments. The subjects performed similar intensity PA during treadmill run and stationary bike exercises. The Empatica E4 data were recorded in all experiments. The participants' demographic information and experiment information (APS type, PA type, duration, starting time, energy expenditure) were recorded. To assess the anxiety response of participants, state-trait anxiety inventory (STAI) [33; 34; 35] self-reported questionnaire data were collected before and after each non-stress and emotional anxiety stress inducement experiment. The STAI-T (trait version) inventory captures the anxiety or discomfort that a subject experiences on a day-to-day basis. STAI-S scores indicate temporal fear, nervousness, discomfort, and arousal of the autonomic nervous system induced by different situations that are perceived as stressful conditions [33; 34; 35]. Not all subjects performed all components of the experiments, and certain cases, such as PA without APS (non-stress), had longer durations. In addition, emotional anxiety stress and mental stress during sedentary states were much longer than during treadmill run and stationary bike PA. This necessitated balancing data sizes, as discussed later in this article.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Device** & **Sensor** & **Frequency of Measurement** \\ \hline \multirow{4}{*}{Gyroscope} & Continuous X-axis acceleration within \(\pm\)2 g with frequency of 32 Hz \\  & Continuous Y-axis acceleration within \(\pm\)2 g with frequency of 32 Hz \\  & Continuous Z-axis acceleration within \(\pm\)2 g with frequency of 32 Hz \\ \cline{2-3}  & PPG & Continuous BVP signal with sampling rate of 64 Hz \\ \cline{2-3}  & Infrared & Continuous SK with the frequency of 4 Hz \\ \cline{2-3}  & Thermopile & Electrodermal \\  & activity sensor & Continuous GSR with the frequency of 4 Hz \\ \cline{2-3}  & - & Inter beat interval (IBI) calculated from BVP signal \\  & & (only available in the offline mode) \\ \cline{2-3}  & - & Heart rate (HR) values with the frequency of 1 Hz \\ \hline \multirow{4}{*}{COSMED K5} & PPG & BVP signal with the sampling rate of 1000 Hz \\ \cline{2-3}  & ECG & ECG signal with the sampling rate of 1000 Hz \\ \cline{2-3}  & VO2 measurement & B-B measurement of MET values each 2–4 s \\ \hline \hline \end{tabular}
\end{table}
Table 1: Characteristics of the measurement devices used in this study.