Towards Improved Short-term Hypoglycemia Prediction and Diabetes Management based on Refined Heart Rate Data

Hypoglycemia is a severe condition of decreased blood glucose, specifically below 70 mg/dL (3.9 mmol/L). This condition can often be asymptomatic and challenging to predict in individuals with type 1 diabetes (T1D). Research on hypoglycemic predictio…

Authors: Vaibhav Gupta, Florian Grensing, Beyza Cinar

T owards Impr ov ed Short-term Hypoglycemia Prediction and Diabetes Management based on Refined Heart Rate Data V aibhav Gupta Data Engineering Helmut-Schmidt-Univ ersity Hambur g guptav@hsu-hh.de Florian Grensing Data Engineering Helmut-Schmidt-Univ ersity Hambur g Beyza Cinar Data Engineering Helmut-Schmidt-Univ ersity Hambur g Louisa van den Boom Clinic for Pediatric and Adolescent Medicine Helios Klinikum Gifhorn GmbH Gifhorn, Germany Maria Maleshkov a Data Engineering Helmut-Schmidt-Univ ersity Hambur g A B S T R AC T Hypoglycemia is a se vere condition of decreased blood glucose, specifically belo w 70 mg/dL (3.9 mmol/L). This condition can often be asymptomatic and challenging to predict in indi viduals with type 1 diabetes (T1D). Research on hypoglycemic prediction typically uses a combination of blood glucose readings and heart rate data to predict hypoglycemic events. Giv en that these features are collected through wearable sensors, they can sometimes ha ve missing values, necessitating ef ficient imputation methods. This work mak es significant contributions to the current state of the art by introducing two nov el imputation techniques for imputing heart rate values ov er short-term horizons: Controlled W eighted Rational Bézier Curves (CRBC) and Controlled Piecewise Cubic Hermite Interpolating Polynomial with mapped peaks and v alleys of Control Points (CMPV). In addition to these imputation methods, we employ two metrics to capture data patterns, alongside a combined metric that integrates the strengths of both individual metrics with RMSE scores for a comprehensi ve ev aluation of the imputation techniques. According to our combined metric assessment, CMPV outperforms the alternativ es with an average score of 0.33 across all time gaps, while CRBC follows with a score of 0.48. These findings clearly demonstrate the ef fectiveness of the proposed imputation methods in accurately filling in missing heart rate v alues. Moreover , this study f acilitates the detection of abnormal physiological signals, enabling the implementation of early prev entive measures for more accurate diagnosis. 1 Introduction T ype 1 diabetes (T1D) is a chronic metabolic disorder characterised by the autoimmune distruction of pancreatic beta-cells, leading to insufficient insulin production. T o mitigate ele vated glucose levels, patients require insulin therapy , which poses a risk of hypoglycemia when blood glucose le vels f all below 70 mg/dL. Hypoglycemia can be life-threatening and is often asymptomatic, therefore, early detection and intervention are necessary [ 1 ]. FD A-approved wearable devices, inte grated with machine learning (ML) algorithms, can prev ent sev ere events such as hypoglycemia through real-time monitoring and alerts [ 2 , 3 , 4 ]. Incorporating multiv ariate data inputs enhances personalisation and improv es predictive model accuracy [ 5 ]. Specifically , electrical sensors such as photoplethysmography (PPG) and electrocardiography (ECG) contribute to the rob ustness of data-driv en models. In particular , ECG data can be used to predict hypoglycemia independently of the continuous glucose monitoring (CGM) inputs, underscoring its predicti ve capacity and its relationship to glycemic v ariability [ 6 ]. Heart rate (HR) is frequently utilized as input for ML models, demonstrating a significant correlation with glucose variability and h ypoglycemic episodes [5, 7, 8]. W earable devices enable continuous, non-inv asiv e data collection but face challenges such as sensor limitations, en vironmental factors, and user -related issues. These can lead to unreliable data due to artefacts, noise, outliers, and data gaps, requiring preprocessing techniques, including imputation, to enhance quality and model ef ficiency [ 9 ]. V arious methods can be employed to address missing data. Analysis of multiple studies utilizing imputation techniques [ 10 , 11 , 12 ] re veals statistical models are typically used for short-time horizons, while linear interpolation is ef fective for g aps of up to two hours [ 13 , 14 ]. For longer gaps of more than two hours, re gression models/deep learning techniques [ 13 ] or aggregation techniques are usually applied [ 14 ]. For instance, Leutheuser et al. impute by using the mean values (aggregation) of the same day [ 15 ]. Ho wev er , statistical methods usually cannot capture the natural pattern of the HR or ECG signals, limiting their ability to effecti vely replicate natural clinically rele vant signals. In particular , for the imputation of HR signals, linear imputation and Piece wise Cubic Hermite Interpolating Polynomial (PCHIP) are popular for short-term gaps [ 10 , 15 ]. Regression models are primarily used for longer gaps because they train on av ailable datasets to predict missing v alues, b ut their computational expense can mak e them less suitable for shorter gaps [ 16 ]. Furthermore, imputation techniques, including statistical and regression models, can also be seen as a way to simulate physiological signals by predicting trends from real data. This makes them strong candidates for dev eloping realistic simulators for physiological signals. Here we address the limitations of statistical techniques in ef fectively imputing short-term gaps, thus the detection of extreme physiological conditions. The primary focus of our work is twofold : 1) First, it aims to enhance the quality of HR data based on imputing missing values for time intervals up-to 30 mins, ensuring its reliability for clinical applications based on data analysis. 2) Second, due to natural heart rate fluctuations, it addresses the need to introduce a multidimensional ev aluation framework to assess imputed data fidelity relati ve to original values, ensuring the comprehensiv e assessment of data quality . T o achieve this, we make the following key contributions: 1) W e introduce two novel imputation methods that capture the natural dynamics of physiological signals, significantly enhancing the accuracy and reliability of data imputation. 2) Additionally , we propose two novel metrics for capturing and ev aluating the fluctuating patterns of imputed HR values, along with a combined ev aluation metric. 3) Finally , we present a preliminary framework for dev eloping a heart rate simulator , laying the foundation for future advancements in HR data synthesis. This study analyses a critical yet underexplored challenge in handling missing data within ph ysiological signals, with a particular focus on best practices for imputing HR data over short-time horizons. By establishing a foundational baseline for de veloping solutions capable of imputing HR v alues, this study pav es the way for potential applications in predicting v arious cardiov ascular and metabolic conditions associated with heart rate fluctuations. The remainder of this paper is structured as follows. Section 2 reports on the state of the art of imputation methods on HR signals. Section 3 introduces the used dataset, the proposed and applied imputation methods and metrics. The obtained results are reported in section 4 and discussed in section 5. Finally , key findings are summarized in section 6. 2 Literature Re view The application of imputation techniques for handling missing values in vital parameters has increased considerably in recent years. The studies revie wed are categorized based on two criteria: 1) studies utilising imputation techniques for missing ECG and HR features for hypoglycemia prediction and 2) studies, primarily focusing on imputing missing values of ECG and HR features. Studies belonging to the first criterion are limited. Mantena [ 17 ] utilises KNN- based imputation methods, V ahedi et al. [ 12 ] and Leutheuser et al. [ 15 ] substitute with mean v alues for HR feature imputation, and Bertachi et al. [ 14 ] used linear interpolation for a maximum of 2 h and removed remaining gaps. Dav e et al. [ 6 ] impute any missing data points in the ECG segment of one minute by averaging the feature in the segment. Hypoglycemic prediction studies focus on the prediction outcomes b ut rarely emphasise the ef fectiv eness of the imputation techniques employed. Multiple research studies highlight various imputation procedures for mitigating data gaps to improv e prediction outcomes. Studies that meet the second criterion include Lin et al. [ 13 ] and Mochurad et al. [ 11 ], who dev elop certain methods for computing and imputing gaps. Lin et al. [ 13 ] generated gap sizes of 2 h, 4 h, 6 h, and 8 h within a 24-h timeframe, whereas Mochurad et al. [ 11 ] generated random gaps constituting 20 per cent of the entire dataset. Lin et al. [ 13 ] uses traditional imputation methods (linear interpolation, exponentially weighted moving average, K-nearest neighbors, Kalman smoothing, and Last Observ ation Carried F orward) alongside deep learning techniques (Denoising Autoencoder , bi-directional RNN, Conte xt Encoders, Spatial-T emporal Completion Netw ork for V ideo Inpainting and HeartImp). HeartImp is reported to be the best imputation method for all gap sizes achie ving RMSE, MAPE and MAE of 14.37, 10.58, 0.13 for Garmin Data (2 h for June) and 15.56, 10.18 and 0.12 for Fitbit data (2 h for July), respectiv ely . Mochurad et al. [ 11 ] employ Bézier and B-spline interpolation for gap imputation, utilising MAPE and R 2 as assessment metrics. T able 1: Overvie w of D1NAMO dataset Dataset D1NAMO Subjects 20 healthy , 9 T1D patients CGM Device iPro2 Professional CGM sensor Physiological Sensor Zephyr Bioharness 3 sensor Signals recording 450h Glucose measurements 8414 Food pictur es 106 Bézier yields MAE and R 2 scores of 0.09 and 0.93, respecti vely , whereas B-Spline interpolation produces scores of 0.19 and 0.87. Despite advancements in imputing features for ECG and HR values in wearable sensor datasets for hypoglycemia prediction, there is still a lack of ef fectiv e imputation methods specifically for short interval gaps (under 30 minutes). T o the best of our kno wledge, no study has focused on imputation techniques tailored to dif ferent short-interval g ap sizes in hypoglycemia prediction datasets. Therefore, this study proposes two ne w imputation methods, specifically tailored to HR values for short term horizons. Furthermore, current research typically ev aluates imputation techniques using metrics such as RMSE, MAPE, and MAE, which measure the numerical de viation between imputed and original values. Howe ver , these metrics fail to adequately assess the accuracy of imputation methods, particularly regarding the preservation of the feature shape of the original data [ 18 ]. T o address this gap, we hav e introduced two shape- preserving metrics that measure and assess the density and peak distrib ution of imputed HR values while maintaining correspondence with the original HR data. 3 Methods and Research Design This study aims to efficiently impute missing HR values to improve the performance of hypoglycemia prediction methods for short-term horizons (under 30 minutes). The methodology of the imputation takes the architecture from Impute Paradigm [ 19 ], in which different gaps are imputed with dif ferent imputation techniques. Therefore, this study focuses on imputing short-term gaps, while the application of similar techniques to long-term gaps remains unexplored. T o address key research gaps in the state-of-the-art, this study introduces two imputation techniques for handling missing HR values in the dataset to impro ve hypoglycemia prediction. These techniques include Controlled W eighted Rational Bézier Curves (CRBC) and Controlled PCHIP , which le verage Mapped Peaks and V alle ys of Control Points (CMPV) to preserve the shape and structure of the data. T o assess the ef fectiv eness of the imputation techniques, we intentionally create gaps in the data, allo wing for a comparison between actual and predicted sequences. The ef fectiv eness of the proposed methods are compared with state of art imputation techniques. T o e valuate the performance of the methods, one state of the art evaluation metric and two proposed e valuation metrics which ef ficiently captures the pattern of the data are proposed. Finally , the results are ev aluated by the combined aggregated metric. Graphs illustrating the imputation methods are presented to substantiate the metric results. In the following subsection, we will examine the structure of the design in detail. 3.1 Dataset Description This study ev aluates the best imputation technique for the HR feature of the D1NMA O dataset [ 20 ] ov er short-term horizons. This dataset meets the criteria of our twofold objecti ve, which we w ant to accomplish through our study . Data of 9 patients with T1D has been utilised for our e xperiments. The dataset comprises of continuous glucose data recorded ev ery 5 minutes using the iPro2 Professional CGM sensor . ECG, breathing and accelerometer outputs measurements are collected ev ery second using the Zephyr Bioharness 3 sensor . These raw signals can be used directly and the device also computes additional aggregated metrics such as HR, Breathing Rate (BR), acti vity level, posture, etc. Further insights of the datasets are presented in table 1. 3.2 Preparing the Experimental Data T o enable an effecti ve e valuation, gaps were deliberately created and the remo ved sequence was used as ground truth. For this, we combined all HR files for each individual patient within the dataset. Follo wing this, we identified all areas which are sufficiently long without g aps. Once we found these areas, we created one random gap for e very four times the gap size. These are chosen at random, with the condition that there are no missing values for at least half the size of the gap before and after the gap, as these are required for the imputation. W e also ensure that there is no overlap in the gaps created. Fewer gaps could be created for lar ger gap sizes, as these require more data. 3.3 Controlled W eighted Rational Bézier Curves (CRBC) Chutchav ong et al. [ 21 ] propose a model based on Rational Bézier-Bernstein Polynomials for simulating ECG wa ves. This model utilises Rational Bézier-Bernstein Curves of degree n (see eq 1 [ 21 ]), which can represent a variety of shapes, including circles, ellipses, parabolas, and hyperbolas [ 21 ]. By maintaining the Rational Bézier-Bernstein Curv es as the foundation and modifying other aspects of the model, our proposed model is used to impute HR v alues ef fectiv ely . The model’ s adaptability stems from the extraction of HR v alues from ECG data using preprocessing techniques. R ( t ) = P n i =0 p i w i B n i ( t ) P n i =0 w i B n i ( t ) (1) Here B n i ( t ) is the Bernstein polynomial of degree n represented by: B n i ( t ) =  n i  t i (1 − t ) n − i and w i are the weights corresponding to the control points ( p i ) for i = 0,1,. . . ,n T o efficiently apply this model for imputing HR v alues, the following design is employed: the endpoints of the missing data segments are lev eraged, whereby fiv e values from the beginning and fi ve v alues from the end are filled linearly . This preserves the linear start and end of the data so the imputation procedure starts and ends at the starting and final kno wn value. The intermediate section is then imputed using the Rational Bézier-Bernstein polynomial. T o impute the middle section, the surrounding points near the missing gaps, referred as control points, are utilised [ 22 ]. Control points are used to capture the HR pattern in the known preceding phase and succeeding phase of the missing v alues, particularly the peaks and v alleys. F or example, in a 60-second gap, 30 preceding and 30 following kno wn values serve as control points to fill the missing section. In these control points, extremums (peaks and v alleys) recei ve additional weights (1.5) than other points (1). The maximum number of control points considered is 900, applicable for time intervals of both 900 seconds and 1800 seconds. Including more than 900 control points can lead to overfitting, making the curve e xcessiv ely sensitive to small changes in control points or weights, resulting in unstable imputed values. Lastly , the final imputed v alues are constrained within the range of 40 to 160 bpm, as this range is clinically relev ant. 3.4 Controlled PCHIP with Mapped P eak and V alleys of Control P oints (CMPV) This method presents an innov ativ e approach to efficti vely capture the intricate patterns in control points found in HR data. By strategically aligning the peaks and v alleys of these control points, the method establishes a rob ust baseline for imputing missing data gaps. By taking this alignment into account, the imputation of missing values reflects the fluctuations, peaks, and v alleys learned from the phases of the control points. The preliminary phase of linearly imputing five v alues from the start and five from the end is analogous. This method employs control points similar to the aforementioned technique; howe ver , rather than assigning weights to the extremums, it in verts and maps the preceding peaks and valle ys of the control point to correspond to the first half of the imputation region, while similarly in verting the succeeding peaks and v alleys of control points to map them to the second half. This in version is crucial for maintaining continuity , as it ensures that the last part of the preceding control points informs the first part of the missing segment. In real-life scenarios, if a person’ s heart rate is in a mild phase just before the data gap, our imputation technique learns from the control points’ peaks and valle ys to precisely fill the starting values of the imputation region with mild phase data. As a result, this mapping creates a template that effecti vely captures the characteristics of surrounding HR values, f acilitating a more accurate fill for the gaps. T o complete the pattern of imputation technique, connection between the mapped control points is done by PCHIP polynomials, as referenced in equation 2 . At last the clipping of imputed values range is done from 40 to 160 bpm, as this range is clinically pertinent. y ( x ) = n − 1 X i =1 ( a i ( x − x i ) 3 + b i ( x − x i ) 2 + c i ( x − x i ) + d i ) (2) 3.5 Comparison Baselines T o compare the proposed imputation approaches, the results are ev aluated against the following imputation techniques. These are selected due to their prev alent application in imputing missing HR and ECG measurements in hypoglycemia prediction research. • Linear: It fits a straight line utilising the giv en endpoints of the gap to compute the missing values. • PCHIP : This interpolation technique is particularly useful for preserving trends in the data and av oiding ov ershooting. (see to equation 2) • K Nearest Neighbor (KNN): This imputation method lev erages the concept of proximity to estimate missing values. It calculates the distance to all known v alues for each missing v alue, selects the closest five neighbours, and imputes the missing value as the mean of these neighbours. This process is repeated for all missing values, ensuring localized and context-a ware imputation. • B Spline: [ 11 ] The process of B-Spline interpolation in volves constructing B-Spline basis functions B i,k ( x ) , where k is the degree, satisfying the conditions: 1) Each basis function B i,k ( x ) is defined over the interv al [ t i , t i + k +1 ] ; 2) B i,k ( x ) is a polynomial of degree k within each interval [ t i , t i +1 ] ; 3) Each point x lies within at most k + 1 neighboring basis functions. 3.6 Evaluation Metrics An important task in imputing missing data is ev aluating the performance of the imputation models. The goal of imputation is not merely to predict the missing data but to capture the underlying properties of the dataset, such as variability and distribution [ 18 ]. This is especially relev ant for physiological data like HR since unlike a machine, the human body has a lot more v ariations due to e xternal factors like stress and physical e xercise. Therefore, using a single predicti ve accuracy metric to compare the ef fectiveness of dif ferent imputation techniques can be misleading. For instance, the RMSE directly compares the imputed values with the actual values, rather than assessing the distributions [ 18 ]. Different metrics capture v arious aspects of perceptual alignment, which can sometimes lead to contradictory results [ 23 ]. For example, a model that performs well according to one metric may score poorly on another . Therefore, it is essential to explore aggregations of dif ferent metrics [23]. Therefore, RMSE [ 18 ], alongside the follo wing ne w ev aluation metrics, are used and proposed to assess the effecti veness of the imputation methods. Finally , we ha ve aggregated the scores of the three metrics for ov erall comparison of the imputation methods. Extremum Density Metric (EDM): W e have introduced and implemented a novel metric to ev aluate the data’ s fluctuations, especially regarding HR features mark ed by frequent peaks and valle ys. Comprehending this fluctuation is essential, as traditional imputation methods, like spline or polynomial interpolation, sometimes fail to adequately capture the intrinsic variations in HR data, which may lead to misleading RMSE metrics. T o ev aluate the effecti veness of an imputation technique, we propose the Extremum Density Metric (EDM) (4), which measures pattern similarity between the original and imputed datasets by analyzing the e xtremum density (ED) – essentially , the frequency of peaks and v alleys present in each dataset. The extremum density function computes the number of peaks and v alleys across the entire data segment and normalizes this count by the segment length. This ev aluation is conducted for both the original and imputed data, subsequently calculating the absolute score difference between the tw o values (3) . EDM = NP + NV LS (3) where NP is the number of peaks, NV is the number of valle ys and LS is length of the segment. EDM Score = | ED(original) − ED (imputed) | (4) Peak Alignment Score Score (P AS): W e have proposed this nov el metric which ev aluates the alignment of peaks between the original HR data and its imputed counterparts. As previously discussed, HR v alues inherently consist of peaks, and accurately replicating these peaks is crucial for reflecting the original HR data characteristics. A significant misalignment in imputed peaks can lead to erroneous interpretations of an individual’ s activity during specific time frames, subsequently affecting the predicti ve accuracy of ML models. For instance, real HR data may exhibit peaks up to 120 bpm, whereas imputed data may peak at 90 bpm. T o assess imputation rob ustness, peaks are identified in both datasets using the find_peaks function. The comparison is based on the minimum number of peaks observed in either sequence; if the original has 10 peaks and the imputed 8, only 8 are used for comparison. Absolute differences between corresponding peak v alues are calculated, and the P AS score is deri ved as their mean (5). If no peaks are detected in either sequence, a default score of 15 is assigned to prevent computational errors, determined as 0.48 abov e the highest observed P AS v alue (14.52). This method not only quantifies the alignment but also provides critical insight into the fidelity of the imputation process, thereby influencing the ov erall performance of subsequent analyses and predicti ve modeling efforts. P AS = av erage ( | y peak (original) − y peak (imputed) | ) (5) The metric scores for each time interval are averaged based on the number of gaps identified. For instance, in the 30-second interv al, 65 gaps are detected. The overall metric scores for that time span are calculated by av eraging the metric scores for each of the 65 gaps. Combined Metric (CM): Aggregation of the scores of different metrics can be perceiv ed as a multidimensional concept, in which dif ferent scores measure different aspects of the datasets [ 23 , 24 , 25 ]. For combining and giving equal weights to the indi vidual metric we ha ve used the aggre gation method deriv ed from the paper of Gupta et al [ 24 , 25 ]. T o calculate the combined metric score for each time period, we first normalize the scores from each metric to make them easier to compare and to bring them in a unified scale. W e determine the normalized scores for the three metrics for each time gap in the data based on metrics scores of dif ferent imputation techniques. The combined score formulates with these assigned weights: weight RMSE ( α ) = 0.333, weight EDM ( β ) = 0.333, weight P AS ( γ ) = 0.333 CM = α ∗ RM S E + β ∗ E D M + γ ∗ P AS (6) Lower indi vidual metric scores indicate better imputation techniques; thus, a lower combined score also signifies a better imputation technique. 4 Results This section presents the results of the e xperiments as described in section 2, which were conducted using the design outlined abov e. These experiments hold significant value in the conte xt of imputation techniques. The lowest number of gaps occurs at 30 seconds and 1800 seconds. For the 30-second time interv al, the control points exhibited fe wer fluctuations, resulting in fewer peaks and v alleys. Meanwhile, for the 1800-second interval, there was insufficient data to utilize additional control points. Overall, an a verage of approximately 80 g aps were identified for each time interval across the patients in the dataset. The ev aluation metrics analysed imputation techniques for each time interval: 30, 60, 300, 600, 900 and 1800 seconds. When it comes to RMSE, the Linear Imputation technique performs better among all the imputation techniques for all the time intervals. Howe ver , as the time interv al increases, the RMSE score for all the imputation techniques, including Linear Imputation, also increases. As per the EDM score, CMPV , that we introduce in this paper , consistently outperforms the other imputation techniques. Notably , the performance shows a promising trend of impro vement as the length of the time interv al increases, sho wcasing its adaptability . Based on P AS score, CMPV performs the best for 30 seconds and CRBC performs best for 60 seconds; KNN performs the best for all the other time gaps, closely followed by CMPV with approximate a verage dif ference of 0.6 from P AS score of KNN. The CM scores indicate that CMPV consistently outperforms all other imputation techniques across v arious time gaps, with the exception of the 1800 second time interval, where it is surpassed by KNN by approximately dif ference of 0.04 in the CM scores. Up to the 600 second mark, our other proposed method, CRBC demonstrates the second-best performance; howe ver , for the 900 second gap, KNN ranks as the second-best method. These results emphasize the reliability of CMPV , establishing it as the most robust imputation technique for short-time gaps of varying lengths. CMPV maintains a stable performance for RMSE metric and P AS metrics for all time intervals and turns out to be better on the basis of EDM scores. CMPV maintains a steady CM score between 0.31 and 0.42 across all time intervals and outperforms other techniques on the basis of CM metric in 5 out of 6 instances. While CRBC exhibits strong performance for time intervals up to 600 seconds for three individual metrics and CM metric, its effecti veness declines for lar ger gaps starting at 900 seconds. Conv ersely , KNN underperforms for indi vidual metrics and maintains CM scores values predominantly abov e 0.5 until the 900 second interval, ultimately outperforming CMPV for the 1800 second gap with a CM score of 0.38. 5 Discussion 5.1 Rationale of Using Imputation T echniques The ef fectiveness of imputation techniques is crucial for preserving natural and informativ e patterns in time-series data. Missing values in datasets are pertinent and are often the result of human error or sensor failures. Shorter gaps, ranging from 30 seconds to 30 minutes, are more common than larger gaps and can arise due to various factors, such as synchronization errors, battery limitations, en viromental interference, connectivity issues or the removal of outliers for brief intervals. These small gaps can lead to the loss of critical data, including extreme ev ents such as abnormal heart rate or glucose fluctuations. This study addressed these limitations by imputing missing data, thereby enhancing the ov erall data quality and improving the predicti ve performance of e xtreme physiological states and enhancing the accuracy of machine learning models for hypoglycaemia prediction. T able 2: Imputation results Sec Metric Linear BSpline KNN PCHIP CRBC CMPV 30 CM 0.67 0.84 0.51 0.72 0.45 0.31 N.O.G RMSE 4.29 5.32 5.19 4.51 5.57 5.47 65 EDM 0.14 0.13 0.10 0.14 0.09 0.07 P AS 15 12.91 8.48 15 5.54 4.98 60 CM 0.66 0.91 0.59 0.72 0.35 0.33 N.O.G RMSE 5.17 6.67 6.42 5.45 6.55 6.57 93 EDM 0.14 0.14 0.12 0.14 0.07 0.06 P AS 15 12.80 7.55 15.0 5.89 6.53 300 CM 0.65 0.77 0.52 0.69 0.46 0.26 N.O.G RMSE 8.27 10.45 10.39 8.64 11.48 10.54 101 EDM 0.12 0.13 0.12 0.12 0.05 0.05 P AS 15 12.49 8.33 15.0 10.18 8.79 600 CM 0.62 0.87 0.56 0.64 0.54 0.31 N.O.G RMSE 10.50 13.22 13.14 10.69 13.61 13.22 87 EDM 0.12 0.13 0.12 0.12 0.08 0.04 P AS 15.0 13.62 9.51 15.0 10.54 9.80 900 CM 0.64 0.77 0.51 0.69 0.61 0.34 N.O.G RMSE 10.81 12.90 12.84 11.35 14.09 13.71 81 EDM 0.12 0.13 0.12 0.12 0.09 0.04 P AS 15 13.25 9.82 15 11.49 10.53 1800 CM 0.64 0.60 0.38 0.68 0.46 0.42 N.O.G RMSE 10.35 10.91 10.83 10.60 11.26 12.39 48 EDM 0.12 0.13 0.12 0.12 0.11 0.04 P AS 15 11.70 8.12 8.58 9.63 9.86 5.2 T emporal V ariability of HR values HR v alues naturally fluctuate due to various e xternal factors, ev en in steady states, in which some variability persists. The HR trend is inherently influenced by both preceding and subsequent phases—referred to as control points in our experimental setup— whose v alues can be utilised for imputing missing gaps. For e xample, if a person is doing ph ysical ex ercise or is experiencing a steady fall in BG v alues, the subsequent phases around the missing values can be utilised to predict and impute the missing gap. Howe ver , existing popular short-interval imputation methods often disre gard surrounding phases, reducing their accurac y . Linear interpolation connects only the first and last known points with a straight line, while PCHIP and B-spline methods use piecewise polynomials but fail to preserve the HR pattern. KNN relies on neighbouring v alues but does not fully capture phase continuity . This study compares state-of-the-art imputation techniques with our proposed methods. Machine or deep learning-based approaches were e xcluded from the baseline comparison, as they are more suitable for long-term imputation (gaps ov er 2 hours) and require extensiv e training data [13, 11]. 5.3 Proposed Imputation T echniques and Ev aluation Metrics Our proposed methods, CRBC and CMPV , are designed with an understanding of the dynamics and functioning of the human heart. These approaches leverage available HR data to identify and reflect the phases preceding and following a missing se gment, enabling the accurate prediction of missing values. HR variations are influenced by the individual’ s activity le vels, with fluctuations characterized by peaks during periods of e xertion and v alleys during rest phases. Recognizing this inherent pattern, our methods prioritize these fluctuations to enhance the imputation process. CRBC utilizes control points by assigning weights to the peaks and valleys, ensuring a more precise reconstruction of missing values. In contrast, CMPV employs an in verse mapping approach, systematically transferring the peak and valley structures of control points onto the missing regions. Moreov er, our methods can facilitate diagnosis by identifying patterns in missing v alues based on surrounding data. In cardiovascular monitoring, if imputed data aligns with physiological trends while recorded values de viate—exhibiting irregular rhythms, erratic fluctuations, or abnormal heart rates—this discrepancy may indicate conditions such as arrhythmias or cardiac stress. T o assess the effecti veness of imputation techniques, the e xisting literature primarily employs metrics such as RMSE, MAPE, and MAE, which focus on comparing imputed estimates to actual v alues rather than ev aluating their distribu- tions [ 18 ]. T o fill this critical gap, we present two metrics: EDM and P AS. EDM analyzes the frequency density of imputed values relativ e to the original data, while P AS assesses the alignment of peaks between imputed and actual v alues. These metrics are designed considering the physiological characteristics of the heart. T o ev aluate how accurately the imputed values preserve the intricate patterns of heart rate fluctuations, an aggregated metric is employed for comprehensiv e assessment. This unified measure considers multiple facets of the original data, including proximity to missing values and distrib ution characteristics, to determine the best imputation method. 5.4 V alidation of Methods The performance of the proposed imputation techniques is analyzed based on indi vidual ev aluation metrics as well as an aggregated metric, the CM score. Linear imputation performs the best on the basis of RMSE scores, our proposed method CMPV performs the best for EDM score and KNN demonstrates a superior performance in 4 out of 6 time periods. The proposed methods in this study , CRBC and CMPV , hav e a comparable performace on the basis of RMSE score with respect to linear imputation with an av erage score of 10.42 and 10.32 respectively , while linear has 8.23. On the basis of the P AS score, CMPV demonstrates stability and reliability in all time gaps with an approximate av erage difference of 0.6 from KNN. This understanding of dif ferent ev aluation metrics fav ouring different imputation techniques v alidates our claim that single ev aluation metric can lead to misleading results. On the basis of the CM score, CMPV outperforms other methods 5 out of 6 times, sho wcasing its stable performance throughout all the indi vidual metrics and CM score. The av erage CM values across all time gaps reinforce the enhanced performance of CMPV and CRBC, demonstrating a significant performance difference. Our methods yield average CM scores of 0.48 for CRBC and 0.33 for CMPV , marking a substantial improvement with the next best score of 0.52 for KNN and ov er other traditional methods, respectiv ely . In summary , the advantages of our proposed methods lie in their ability to capture the intricate dynamics of the heart, resulting in a more accurate imputation process. 5.5 Personalised Heart Rate Simulator This study represents a foundational step tow ard developing a personalised HR simulator capable of forecasting heart rate dynamics based on the patient’ s physiological phases. Such a model could function as a standalone predictive tool and contribute to early intervention strategies for medical conditions beyond hypoglycemia that are linked to heart rate variability . Additionally , this approach has the potential to improv e effecti veness of wearable health de vices by enabling real-time anomaly detection and issuing early w arnings for extreme HR fluctuations, ultimately impro ving patient monitoring and prev entiv e healthcare measures. 6 Conclusion This study highlights the importance of imputing missing data to enhance the performance of detection of extreme e vents in HR and BG values. The practical implications of our research are significant, as it pro vides a more accurate and reliable method for handling missing HR values. Our proposed imputation techniques, CRBC and CMPV , outperform the traditional imputation techniques for imputing HR values o ver a short-term horizon. By assessing the effecti veness of the imputation methods using v arious metrics – including one state-of-the-art metric, two proposed no vel metrics, and one proposed combined metric – we demonstrate that our methods lead to a significant impro vement in accuracy . Specifically , we achie ve an a verage improvement of approximately 4% for the CRBF method and 19% for the CMPV method compared to state-of-the-art imputation techniques, as measured by the combined metric across all time gaps. Our work in addressing the limitations of missing v alues in HR features is a fundamental step tow ards improving the data quality and supporting more accurate prediction models. This research not only contributes to the advancement of imputation techniques b ut also pro vides a strong foundation for the dev elopment of a heart rate simulator for forecasting HR values with the aid of real-time data. 6.1 Limitation and Future W ork Currently , 30 seconds to 30 minutes of HR data have been imputed, with performance declining as time horizons increase. Future work will focus on improving accurac y by optimising weights and control points, a limitation of this study due to the small dataset size. Notably , parameter fine-tuning requires dif ferent datasets representing a v ariable population. Moreov er, an enhanced frame work aggregating dif ferent ev aluation metrics into a unified structure supports a more robust e valuation that can be used in dif ferent domains. T o ensure the generalizability and data independence of our framework, we will apply it to di verse datasets, ev aluating its ef fectiveness in improving short-term detection accurac y for critical conditions such as hypoglycemia in patients with T1D patients. Furthermore, we will explore optimal imputation strategies for extended time horizons, advancing a multi-step, multi-model imputation framew ork specifically designed for HR data. Also, a hybrid imputation technique will be explored utilising the frame work of Physics Informed neural Networks (PINNs) architecture [ 26 ]. These efforts will pav e the way for more reliable, data-driv en clinical insights, ultimately enhancing early detection and intervention for critical health conditions. References [1] American Diabetes Association Professional Practice Committee, “2. diagnosis and classification of diabetes: Standards of care in diabetes—2024, ” Diabetes Care , v ol. 47, pp. S20–S42, Jan. 2024. [2] A. Nomura, M. Noguchi, M. K ometani, K. Furukaw a, and T . Y oneda, “ Artificial intelligence in current diabetes management and prediction, ” Current Diabetes Reports , vol. 21, Dec. 2021. [3] B. Cinar and M. Maleshkov a, “Benchmarking hypoglycemia classification using quality-enhanced diadata, ” IEEE Journal of Biomedical and Health Informatics , 2025. Early Access. [4] F . Grensing, B. Cinar, and M. Maleshkov a, “Early warning of hypoglycemia via sensor-agnostic machine learning: a clinical app design for type 1 diabetes, ” in International Confer ences on Applied Computing 2025 and WWW/Internet 2025: Proceedings , pp. 216–224, IADIS Press, 2025. [5] A. Site, J. Nurmi, and E. S. Lohan, “Machine-learning-based diabetes prediction using multisensor data, ” IEEE Sensors Journal , v ol. 23, p. 28370–28377, Nov . 2023. [6] D. Dav e, K. Vyas, K. Branan, S. McKay , D. J. DeSalvo, R. Gutierrez-Osuna, G. L. Cote, and M. Erraguntla, “Detection of hypoglycemia and hyper glycemia using nonin vasi ve wearable sensors: Electrocardiograms and accelerometry , ” Journal of Diabetes Science and T echnology , vol. 18, no. 2, pp. 351–362, 2024. [7] D. T . W eiler , S. O. V illajuan, L. Edkins, S. Cleary , and J. J. Saleem, “W earable heart rate monitor technology accuracy in research: A comparativ e study between ppg and ecg technology , ” Pr oceedings of the Human F actors and Er gonomics Society Annual Meeting , vol. 61, p. 1292–1296, Sept. 2017. [8] C. Y u, Z. Liu, T . McK enna, A. T . Reisner , and J. Reifman, “ A method for automatic identification of reliable heart rates calculated from ecg and ppg wav eforms, ” Journal of the American Medical Informatics Association , vol. 13, p. 309–320, May 2006. [9] Cinar , Beyza and Maleshkov a, Maria, “Diadata: An integrated large dataset for type 1 diabetes and hypoglycemia research, ” BIO W eb Conf. , vol. 195, p. 03001, 2025. [10] M. Benchekroun, B. Chev allier , V . Zalc, D. Istrate, D. Lenne, and N. V era, “The impact of missing data on heart rate variability features: A comparativ e study of interpolation methods for ambulatory health monitoring, ” IRBM , vol. 44, p. 100776, Aug. 2023. [11] L. Mochurad and Y . Mochurad, “Parallel algorithms for interpolation with bezier curves and b-splines for medical data recov ery , ” in International W orkshop on Informatics & Data-Driven Medicine , 2023. [12] M. R. V ahedi, K. B. MacBride, W . W unsik, Y . Kim, C. Fong, A. J. Padilla, M. Pourhomayoun, A. Zhong, S. Kulkarni, S. Arunachalam, and B. Jiang, “Predicting glucose le vels in patients with type1 diabetes based on physiological and activity data, ” MobileHealth’18, (New Y ork, NY , USA), Association for Computing Machinery , 2018. [13] S. Lin, X. W u, G. Martinez, and N. V . Chawla, F illing Missing V alues on W earable-Sensory T ime Series Data , pp. 46–54. [14] A. Bertachi, C. V iñals, L. Biagi, I. Contreras, J. V ehí, I. Conget, and M. Giménez, “Prediction of nocturnal hypoglycemia in adults with type 1 diabetes under multiple daily injections using continuous glucose monitoring and physical acti vity monitor, ” Sensors , v ol. 20, p. 1705, Mar . 2020. [15] H. Leutheuser , M. Bartholet, A. Marx, M. Pfister , M.-A. Burckhardt, S. Bachmann, and J. E. V ogt, “Predicting risk for nocturnal hypoglycemia after ph ysical activity in children with type 1 diabetes, ” F r ontiers in Medicine , vol. 11, Oct. 2024. [16] A. Flores, H. T ito-Chura, O. Cuentas-T oledo, V . Y ana-Mamani, and D. Centty-V illafuerte, “Pm2.5 time series imputation with moving a verages, smoothing, and linear interpolation, ” Computers , vol. 13, no. 12, 2024. [17] S. Mantena, A. Arévalo, J. Maley , S. da Silva V ieira, R. Mateo-Collado, J. da Costa Sousa, and L. Celi, “Predicting hypoglycemia in critically ill patients using machine learning and electronic health records, ” Journal of Clinical Monitoring and Computing , vol. 36, pp. 1297–1303, Oct. 2022. Epub 2021 Oct 4. [18] O. Boursalie, R. Sama vi, and T . E. Do yle, Evaluation Metrics for Deep Learning Imputation Models , pp. 309–322. Cham: Springer International Publishing, 2022. [19] V . Gupta, F . Grensing, B. Cinar , and M. Maleshkov a, “Imputing missing multi-sensor data in the healthcare domain: A systematic revie w , ” Ima ge and V ision Computing , vol. 164, p. 105797, 2025. [20] F . Dubosson, J.-E. Ran vier, S. Bromuri, J.-P . Calbimonte, J. Ruiz, and M. Schumacher , “The open d1namo dataset: A multi-modal dataset for research on non-inv asiv e type 1 diabetes management, ” Informatics in Medicine Unlock ed , vol. 13, pp. 92–100, 2018. [21] V . Chutcha vong, K. Nualon, O. Sangaroon, and K. Janchitrapongv ej, “ A mathematical model for ecg wav eform using rational bézier curves and bernstein polynomials, ” 2014 11th International Confer ence on Electrical Engineering/Electr onics, Computer , T elecommunications and Information T echnology (ECTI-CON) , pp. 1–5, 2014. [22] S. Chakrabarti, N. Biswas, K. Karnani, V . Padul, L. D. Jones, S. Kesari, and S. Ashili, “Binned data provide better imputation of missing time series data from wearables, ” Sensors , vol. 23, no. 3, 2023. [23] J. Ahlert, T . Klein, F . W ichmann, and R. Geirhos, “How aligned are dif ferent alignment metrics?, ” 2024. [24] Gupta, V aibhav and Maleshko va, Maria, “Be yond accuracy: Assessment of statistical imputation techniques for heart rate data, ” BIO W eb Conf. , vol. 195, p. 03002, 2025. [25] V . Gupta, F . Grensing, L. van den Boom, and M. Maleshko va, “Fram-shap: Framework for combined e valuation metrics through shap analysis, ” in 2025 IEEE 25th International Confer ence on Bioinformatics and Bioengineering (BIBE) , pp. 444–448, 2025. [26] V . Gupta, F . Marsili, S. Keßler , and M. Maleshkov a, “Physics-informed neural networks used for structural health monitoring in civil infrastructures: State of art and current challenges, ” in Pr oceedings of the 35th Eur opean Safety and Reliability Confer ence (ESREL) and the 33rd Society for Risk Analysis Eur ope Confer ence (SRA-Eur ope) , (Stav anger , Norway), June 2025.

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment