## 2 Materials and Methods
### Handling Class Imbalances
This study was conducted in accordance with the Declaration of Helsinki and approved by the Institutional Review Board of Illinois Institute of Technology (Protocol code IRB 2019-018, date 16 October 2019). Informed Consent Statement: Informed consent was obtained from all subjects involved in the study. Data Availability Statement: The models were developed in open-source Python libraries and the trained models are available at the GitHub public repository [[https://github.com/rezaaskary/MDPI-Algorithms.git](https://github.com/rezaaskary/MDPI-Algorithms.git)]([https://github.com/rezaaskary/MDPI-Algorithms.git](https://github.com/rezaaskary/MDPI-Algorithms.git)) (accessed on 31 July 2022). [PERSON] is grateful for funds provided by the [PERSON] at the Illinois Institute of Technology. Research reported in this publication was partially supported by the National Institute of Diabetes And Digestive And Kidney Diseases of the National Institutes of Health under Awards No. 1 DP3 DK101075 and 1R01 DK130049. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health. Conflicts of Interest: The authors declare no conflict of interest. The funders had no role in the design of the study, in the collection, analysis, or interpretation of the data, in the writing of the manuscript, or in the decision to publish the results. ## Abbreviations

The following abbreviations are used in this manuscript:

APS Acute Psychological Stress PA Physical Activity ROCKET Random Convolutional Kernel Transformation BVP Blood Volume Pulse GSR Galvanic Skin Response ST Skin Temperature PCA Principal Component Analysis SFS Sequential Forward Selection PLS-DA Partial Least Squares-Discriminant Analysis ADASYN Adaptive Synthetic Sampling LSTM Long Short-Term Memory BGC Blood Glucose Concentration T1D Type-1 Diabetes CGM Continuous Glucose Monitoring HR Heart Rate IBI Inter-beat Interval SCR Phase Skin Conductance Response SCL Tonic Skin Conductance Level PPV Proportion of Positive Values FFT Fast Fourier Transform PPCA Probabilistic Principal Component Analysis PC Principal Components VIP Variable Important for Projection ReLU SMOTE Synthetic Minority Oversampling Technique

## References

* [PERSON] et al. (2022) [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON] A.; [PERSON]; [PERSON]; et al. IDF Diabetes Atlas: Global, regional and country-level diabetes prevalence estimates for 2021 and projections for 2045. _Diabetes Res. Clin. Pract._**2022**, _183_, 109119. [CrossRef] [PubMed Med] [PERSON] et al. (2018) [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON]; et al. Incorporating unannounced meals and exercise in adaptive learning of personalized models for multivariable artificial pancreas systems. _J. Diabetes Sci. Technol._**2018**, _12_, 953-966. [CrossRef] [PubMed Med] [PERSON] et al. (2019) [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON] Adaptive personalized multivariable artificial pancreas using plasma insulin estimates. _J. Process Control_**2019**, _80_, 26-40. [CrossRef]
* [PERSON] et al. (2016) [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON] A comparison of wearable and stationary sensors for stress detection. In Proceedings of the 2016 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Budapest, Hungary, 9-12 October 2016; pp. 004362-004366. * [PERSON] et al. (2015) [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON] [PERSON]; [PERSON] Stress detection using wearable physiological sensors. In Proceedings of the International Work-Conference on the Interplay between Natural and Artificial Computation, Elche, Spain, 1-5 June 2015; pp. 526-532. * [PERSON] et al. (2019) [PERSON]; [PERSON]; [PERSON] Stress detection in daily life scenarios using smart phones and wearable sensors: A survey. _J. Biomol. Inform._**2019**, _92_, 103139.