Smart-Watches Assisted Sugar Level Monitoring with Different Activities and Nutrition based on Machine Learning Approaches

ABSTRACT


Introduction
These days, diabetes is a complex disease in the human body, but in simple words, it is a lifestyle where body glucose can rise due to different activities (e.g., eating, sitting, and nutrition) [1].There are many ways to detect the sugar level in the body such as non-invasive glucose monitoring devices and smart watches which take different biomarkers from the human body.The bio-makers are blood samples, blood pressure, and CGM (Continuous Glucose Monitor) System Transmitter Sensor.Therefore, the role of the Internet of Things (IoT) has been gaining a lot of population to monitor the glucose level in the human body with the assistance of CGM [2].Nutrition has a lot of impact on body glucose when the human eats different diets that impact on body glucose [3].Therefore, the role of nutrition and technologies for body glucose is very critical to avoid any loss from this diabetes disease.Recently, the role of artificial intelligence and machine learning has emerged where these approaches assist and predict the glucose level in humans with different biomarkers [4].
These type-2 diabetes detection based on machine learning widely investigated in these studies [5][6][7][8][9][10].These studies investigated diabetes body glucose based on different biomarkers such as blood pressure, nutrition, obesity, glucose, retinopathy, and other factors.Machine learning approaches such as support vector machines, random forests, convolutional neural networks, LSTM, gradient boost, and decision trees are widely exploited to monitor and predict type 2 diabetes reasons in the human body.However, many research challenges exist in these methods and approaches to living well-being lives with diabetes and pre-diabetes in practice.
These are research questions; we are considering in this paper.(i) The existing diabetes detection and glucose monitoring methods did not consider the different human behaviors such as activities (e.g., sitting, moving, running, walking, and sleeping).Therefore, the new methods should consider these activities which are beneficial for humans with diabetes.(ii) The existing methods did not consider the direct relationship between nutrition and glucose levels in the body.Therefore, these aspects are widely ignored in existing research.
In this paper, we are suggesting an Internet of Things Assisted Sugar Level Monitoring Framework on Different Biomarkers based on Machine Learning Approaches.The objective is to monitor the glucose level of the body during different activities.Meanwhile, we predict the glucose level during eating of different nutrition in the body.With the objectives, the paper makes the following contributions.
(a).This study presents the IoT-assisted glucose monitoring framework that consists of different biomarkers and related parameters.
(b).We present the machine learning approaches to predict the classify the diabetes ratio in the human body.
(c).We present the dataset and simulation code at the end of the paper for further analysis and research.
The paper is organized in the following way.Section 2 is about related work.Section 3 is about methodology.Section 4 is about simulation results and discussion.Section 5 is about the conclusion and future work.

Related Work
Many studies suggested different diabetes and glucose monitoring frameworks in practice which are deployed and implemented in different laboratories.The glucose monitoring machines such as smart watches were introduced to collect real-time data from the human body during different time intervals.In study [1] non-invasive characterization of glycosuria and identification of biomarkers in diabetic urine using fluorescence spectroscopy and machine learning algorithm is presented for diabetes patients.These bio-makers such as blood pressure and glycosuria are identified at different research laboratories where diabetes prediction and classification are evaluated based on machine learning approaches.Study [2] presented a machine learning approach for the electrochemiluminescence-based point-of-care testing device to detect multiple biomarkers.Sensors and Actuators based on IoT are presented for diabetes patients.The biomarkers are blood pressure, age, obesity, and body mass index correlated and predict diabetes among patients.Impact of nutritional factors in blood glucose prediction in type 1 diabetes through machine learning and big data and machine learning to tackle diabetes management investigated in these studies [3,4].These studies focused on different nutrition based on their calories which directly affect the body glucose in human bodies.These studies predict and classify the glucose level at different time intervals.
Studies [5][6][7][8][9][10] focused on type-2 diabetes with different bio-makers and nutrition with different intakes in body behaviours.The Prediction of type 2 diabetes mellitus using hematological factors based on machine learning approaches: a cohort study analysis.These studies exploited different machine learning approaches such as random forest, decision tree, k-means, and convolutional neural networks are widely implemented to predict diabetes that have different cooperated dependent variables.The random datasets considered consisted of different biomarker data values with different age groups of people.
Studies [11][12][13][14][15][16][17][18][19][20] suggested CGM IoT-enabled smart watches assisted glucose monitoring frameworks.The data is offloaded and analyzed at different hospital servers for processing.These works supported glucose monitoring in the ubiquitous environment, where patients can monitor their glucose health during eating and work at their offices and homes.The IoT CGM is a non-invasive device that is available in terms of smart-watches and all users can buy and use them during their activities.Ongoing Glucose Monitoring (OGM) is a technological tool for overseeing diabetes through the continuous observation of real-time blood glucose levels day and night.Provided here is a summary of essential elements linked to ongoing Glucose Monitoring.These studies integrated OGM for diabetes patients to provide continuous and detailed insights into their blood glucose levels.It assists in making informed decisions regarding insulin doses, dietary selections, and lifestyle.Systems for ongoing glucose monitoring consist of a small sensor placed under the skin, typically on the abdomen.The sensor measures glucose levels in the interstitial fluid (the fluid surrounding the cells) and transmits the data to a monitor or smartphone.Continuous glucose monitoring provides immediate data on glucose levels, typically displaying the information every few minutes.This enables users to observe trends, recognize patterns, and promptly respond to elevated or diminished glucose levels.OGM devices often come with flexible notifications and alarms to notify users when their glucose levels are excessively high or low.This feature is particularly useful for preventing severe hypoglycemia or hyperglycemia.Some OGM systems can be integrated with insulin pumps, forming a closed-loop system.This allows automated adjustments to insulin distribution based on real-time glucose data, providing a more meticulous and dynamic approach to diabetes oversight.Users can analyze OGM data to understand their glucose trends over time.This data is invaluable for healthcare practitioners to make adjustments to treatment plans during routine examinations.OGM has demonstrated effectiveness in contributing to improved glycemic control and reducing HbA1c levels in individuals with diabetes.It provides a more comprehensive portrayal of glucose fluctuations compared to traditional self-monitoring methods.Continuous glucose monitoring reduces the need for frequent fingerstick tests, presenting a more convenient and less intrusive technique for glucose oversight.Despite its advantages, OGM technology may encounter obstacles such as cost, precision of devices, and user adherence.Additionally, users must periodically calibrate certain OGM systems with conventional blood glucose measurements.The technology for ongoing glucose monitoring continues to advance.Progress includes improved sensor precision, extended wear durations, smaller and more comfortable devices, and integration with emerging technologies like artificial intelligence for predictive analytics.OGM has significantly improved diabetes management by offering a more comprehensive understanding of glucose dynamics, enhancing treatment decisions, and ultimately improving the quality of life for individuals with diabetes.
To the best of our knowledge, the Internet of Things Assisted Sugar Level Monitoring Framework with different activities on Different Biomarkers based on Machine Learning Approaches has not been studied yet.We are solving the incremental glucose monitoring problem with many biomarkers, activities, and approaches based on different diversity of generated data from different patients.Therefore, we are very different from existing studies and try to solve the aforementioned research questions in our work.

Proposed Sugar Glucose Monitoring Algorithm Framework
In this paper, we present the activity and nutrition-assisted sugar glucose level monitoring algorithm framework that consists of different components as shown in Figure 1.The algorithm components consisted of smartwatches glucose monitoring data, and nutrition data while subjects performed their activities in daily life practice.We consider that each subject exploits CGM during eating, running, walking, and different activities and collect their data at the runtime.The data has only a numeric form based on set threshold values and is stored in the dataset with extension CSV.The nutrition can be anything with different calories eaten by the subject, then we observe the sugar level with the assistance of CGM smartwatches.We present the ASA algorithm framework that consists of different sub-schemes as shown in Figure 1.
We denoted the ASA algorithm schemes in algorithmic as shown in Algorithm 1.It works like a flowchart and defines the hierarchy of data processing from input to decision.Algorithm 1 takes the input as a dataset CSV file which was collected from different CGM IoT devices and nutrition data.We exploited this dataset as real-time data which consisted of different features.The features are defined in the following way: Subject, Age, sugar glucose, Activity, Body mass index (BMI), diabetes, and blood pressure.We pre-process the data when it is divided into a features matrix and remove all null and unnecessary values from the data.We conducted this process on the machine which is high processing computing machine.We consider the constraints such as accuracy, F1-score, precision, and recall values for the prediction and classification of sugar glucose in different subjects.We set these hyper-parameters on different algorithms such as the K-Nearest Neighbours Algorithm (KNN), Support Vector Classifier (SVC), Decision tree (DT), Gaussian Naive Bayes (GNB), Random Forest (RF), and Gradient Boost (GB) are implemented to predict and classify the data based on given hyperparameters.We implemented these algorithms along with ASA to predict the diabetes and sugar glucose level in different subjects during their activities in practice.We executed all data features based on their extracted features and made decisions based on their probability values.The prediction and result are the last phase of the algorithm as shown in Algorithm We show the implementation of the algorithm in the experimental part, where different visual analytics and statistical methods are applied to show the results from different perspectives.We determined the prediction and result on the following metrics.4) shows the accuracy of the generated results which is consisted of TP, FP False negative (FN), and True negative (TN).We measured these metrics in the performance evaluation and discussed them in the result analysis.We monitor the sugar glucose monitoring of different subjects with the different parameters such as age, glucose, walking, sitting, sleeping, running, blood pressure, nutrition, BMI and calories consumption as shown in Figure 2. We analyzed and monitored this kind of process with different subjects when they were wearing smart which generated the values of sugar glucose level, and blood pressure while a subjects eating, running, walking, and sitting in their daily lives.Therefore, our framework shows the prototype where we can monitor the glucose relationship with the different variables as shown in Figure 2.
Based on collected data from smart watches (CGM), the values are different diabetes and nondiabetes subjects.Therefore, the impact of nutrition, activities on glucose levels could be changed.Therefore, we predict the result based on the subject health such as whether either subject is diabetic or non-diabetic as shown in the confusion matric   We show the glucose level results based on different cell results that were collected with the smartwatches such as glucose level, healthy blood cells, and blood circulation with the different activities.In Figure 4, the first aspect shows that a subject is walking and eating nutrition and manageable sugar level in the body, where blue dots are less and lower as compared to healthy cells and body circulation.In the second aspect, a subject is eating and sitting, we can observe the ratio of sugar and glucose level is increased at the upper level when a subject is not doing any activity.When a subject runs in different time intervals, the body's sugar and glucose level always remain stable as compared to not doing any activity as shown in aspects 3 and aspects 4 in Figure 4. Figure 5 shows that all algorithms can reach different predictions, when the subjects performed the different activities and eating with activity and eating without activity in different time intervals.Almost, all algorithms obtained good results, ASA obtained a better result that is 0.77 as compared to all algorithms.However, it is our initial prototype and empirical work, there still accuracy needs to be improved more in future works.

Conclusions
We presented the modified dataset with an additional feature such as sugar glucose level with different activities (e.g., running, sitting, sleeping, and walking) while eating different nutrition at various time intervals.We presented empirical machine learning, such as an activity glucose monitoring algorithm (ASA), which executed all datasets with more optimal results.Simulation results showed that our proposed framework was more optimal and displayed glucose monitoring with different activities and more features compared to existing smartwatches.We obtained an accuracy of 78% compared to existing machine-learning methods.In the result analysis, we showed the different aspects of activities that are useful for the subjects to monitor their glucose level through different smartwatch features at work.
In future work, we will improve the accuracy of the ASA algorithm and consider many other factors such as glucose controlling and monitoring in a parallel way during time intervals in the optimal way.Author Contributions S.M. designed this paper, writing, methodology, software, data analysis, and experiments.

Funding
For this manuscript, I am working individually, therefore, I have no funding for this paper.

Data Availability Statement
In this paper, we put the data and code on the public repository that is GitHub and available at the following link: https://github.com/Sajida-memon/Activity-and-Nutrition-Glucose-Monitoring/tree/main.The code and dataset consisted of a source where we exploited the dataset and code and improved it according to our considered problem as shown in Figure 1.

Fig. 1 .
Fig. 1.Smart-Watches Assisted Sugar Level Monitoring with Different Activities and Nutrition based on Machine Learning Approaches shows the precision that is true positive (TP) and false positive (FP) on the generated results.shows the recall that is true positive (TP) and false negative (FN) on the generated results.shows the F1-score that is dependent upon the recall and precision of the generated results.

Figure 3 .
The values are determined based on equations (1-4) with the true positive and false positive and true negative and false negative values as shown in Figure3label.

Fig. 4 .
Fig. 4. Glucose Level with Activities and Nutrition for Patients.

Table 2
Result from Discussion with Different Metrics