Metrics#
This module contains functions for calculating metrics of a glucose time series. The functions are meant to be used
by the glucopy.Gframe
class, but can be used independently as well as long as the input has the next columns:
‘Timestamp’ : datetime64[ns] # pandas datetime
‘Day’ : datetime.date
‘Time’ : datetime.time
‘CGM’ : number
1. Joint data analysis metrics for glycaemia dynamics#
|
Calculates the mean of the CGM values. |
|
Calculates the standard deviation of the CGM values. |
|
Calculates the Coefficient of Variation (CV) of the CGM values. |
|
Calculates the quantile of the CGM values. |
|
Calculates the Interquartile Range (IQR) of the CGM values. |
|
Calculates the Mean of Daily Differences (MODD). |
|
Calculates the Time in Range (TIR) for a given target range of glucose. |
2. Analysis of distribution in the plane for glycaemia dynamics#
|
Calculates the Frequency Distribution (FD) for a given target range of glucose. |
|
Calculates the Area Under the Curve (AUC) using the trapezoidal rule. |
3. Amplitude and distribution of frequencies metrics for glycaemia dynamics#
|
Calculates the Mean Amplitude of Glycaemic Excursions (MAGE). |
|
Calculates the Distance Travelled (DT). |
4. Metrics for the analysis of glycaemic dynamics using scores of glucose values#
|
Calculates the Low Blood Glucose Index (LBGI) or the High Blood Glucose Index (LBGI). |
|
Calculates the contributions of the Glycaemic Risk Assessment Diabetes Equation (GRADE) to Hypoglycaemia, Euglycaemia and Hyperglycaemia. |
5. Metrics for the analysis of glycaemic dynamics using variability estimation#
|
Calculates the Mean Absolute Relative Difference (MARD). |
|
Calculates the Continuous Overall Net Glycaemic Action (CONGA). |
|
Calculates the Glucose Variability Percentage (GVP), with time in minutes. |
|
Calculates the Mean Absolute Glucose Change per unit of time (MAG). |
6. Computational methods for the analysis of glycemic dynamics#
|
Calculates the Detrended Fluctuation Analysis (DFA) using neurokit2.fractal_dfa(). |
|
Calculates the Sample Entropy using neurokit2.entropy_sample() |
|
Calculates the Multiscale Sample Entropy using neurokit2.entropy_multiscale() |