## 6 Conclusions  
The advantage of the multi-task learning approach is that a single model is developed and maintained instead of many independent classification and regression models. Exploiting the shared representations in the data by training one model to predict the related tasks of PA and APS jointly can improve data efficiency. We used data collected during exercise sessions and daily life activities relying only on the physiological signals measured noninvasively by Empatica E4 wristband. Random convolutional kernel transformation is employed to extract a large number of features from the time series signals. Two different feature selection techniques are used to select the most informative features, PLS-DA for the classification tasks and PLS for the regression task. In order to address the issue of the imbalanced classes, two different approaches are employed: weighted training and ADASYN. The multi-task RNN model with LSTM is developed to simultaneously classify the type of PA and estimate its intensity and classify the type of APS. Multi-task LSTM RNN classification of APS types (NS, EAS, MS) and PA types (SS, SB, TR) with weighted training achieved the highest F1 score for both APS and PA types. A multi-task XGBoost model is developed to simultaneously classify the type of PA and the type of APS where the multitask XGBoost achieved higher F1 scores in comparison to the independent XGBoost. The results illustrate that multi-task NN and multi-task XGBoost can effectively assess the signals from wearable sensors and effectively enhance the detection of PA and APS. Conceptualization, M.M.R., M.R.A. and A.C.; methodology, M.A.-L. and M.R.A. ; software, M.A.-L. and M.R.A. ; validation, M.A.-L., M.M.R. and M.R.A. ; formal analysis, M.A.-L., M.M.R., M.R.A. and A.C.; investigation, M.R.A., M.A.-L., M.M.R. and A.C.; resources, L.Q. and A.C.; data curation, M.P., L.S., L.Q. and M.R.A. ; writing--original draft preparation, M.A.-L., M.M.R. and A.C.; writing--review and editing, M.A.-L., M.M.R., A.C., M.P., L.S. and L.Q. ; visualization, M.R.A. ; supervision, A.C., L.S. and L.Q. ; project administration, M.P. and M.R.A. ; funding acquisition, A.C. and L.Q. All authors have read and agreed to the published version of the manuscript. Financial support from the NIH under the grants 1 DP3 DK101075 and 1R01 DK130049, and JDRF under grant 2-SRA - 2017-506-M-B made possible through collaboration between the JDRF and the Leona M. and Harry B. Helmsley Charitable Trust is gratefully acknowledged. The studies were 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, 16 October 2019) and the Institutional Review Board of University of Illinois Chicago (Protocol # 2018-0989, 23 December 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/MDPIAlgorithms.git](https://github.com/rezaaskary/MDPIAlgorithms.git)]([https://github.com/rezaaskary/MDPIAlgorithms.git](https://github.com/rezaaskary/MDPIAlgorithms.git)). [PERSON] is grateful for funds provided by the [PERSON] Endowed Chair at 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 Award Numbers 1 DP3 DK101075 and 1R01 DK130049. The content is solely the responsibility of the authors. The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.