Design of a Real-Time Physical Activity Detection and Classification Framework for Individuals With Type 1 Diabetes

J Diabetes Sci Technol. 2023 Feb 17:19322968231153896. doi: 10.1177/19322968231153896. Online ahead of print.

Abstract

Background: Managing glycemia during and after exercise events in type 1 diabetes (T1D) is challenging since these events can have wide-ranging effects on glycemia depending on the event timing, type, intensity. To this end, advanced physical activity-informed technologies can be beneficial for improving glucose control.

Methods: We propose a real-time physical activity detection and classification framework, which builds upon random forest models. This module automatically detects exercise sessions and predicts the activity type and intensity from tri-axial accelerometer, heart rate, and continuous glucose monitoring records.

Results: Data from 19 adults with T1D who performed structured sessions of either aerobic, resistance, or high-intensity interval exercise at varying times of day were used to train and test this framework. The exercise onset and completion were both predicted within 1 minute with an average accuracy of 81% and 78%, respectively. Activity type and intensity were identified within 2.38 minutes and from the exercise onset. On participants assigned to the test set, the average accuracy for activity type and intensity classification was 74% and 73%, respectively, if exercise was announced. For unannounced exercise events, the classification accuracy was 65% for the activity type and 70% for its intensity.

Conclusions: The proposed module showed high performance in detection and classification of exercise in real-time within a minute of exercise onset. Integration of this module into insulin therapy decisions can help facilitate glucose management around physical activity.

Keywords: continuous glucose monitoring; physical activity; random forest; type 1 diabetes; wearable devices.