Using Nearest Neighbor to Classify Activity
Bequette, B. Wayne
MetadataShow full item record
Optimal control response for the closed-loop artificial pancreas depends on the current activity and future activity of Type 1 Diabetes (T1D) patients as this can impact the regulation of their blood glucose levels. By incorporating Smartwatch readings to the closed-loop artificial pancreas, the activity state of the patient can potentially be recognized through the common wrist actions that occur while sleeping, eating, or exercising. The goal of this project is to predict activity state by training a machine learning algorithm (K-Nearest Neighbor) on the accelerometer, gyroscope, and quaternion readings collected on the smartwatch. Activities were logged onto an Android app called DiabetesHelper. The data collected spanned 14 days and was divided into two-minute intervals. Within those two-minute intervals, the mean and standard deviations were generated for each sensor readings. The data was then randomly sampled such that each activity type had equal amount of data. 1000 iterations of the KNN was performed and the k parameter was changed to see how accuracy was impacted. The average accuracy was found from k=2 to k=10. K=2 was found to have the highest average accuracy.