Gframe#

Constructor#

Gframe([data, unit, date_column, ...])

Class for the analysis of CGM data.

Utilities#

Gframe.convert_unit([new_unit])

Converts the unit of the CGM signal.

Summary#

Gframe.summary([auc_time_unit, ...])

Calculates a summary of the metrics for the entire dataset or for each day separately.

Metrics#

1. Joint data analysis metrics for glycaemia dynamics#

Gframe.mean([per_day])

Calculates the mean of the CGM values.

Gframe.std([per_day, ddof])

Calculates the standard deviation of the CGM values.

Gframe.cv([per_day, ddof])

Calculates the Coefficient of Variation (CV) of the CGM values.

Gframe.pcv([per_day, ddof])

Calculates the Percentage Coefficient of Variation (%CV) of the CGM values.

Gframe.quantile([per_day, q, interpolation])

Calculates the quantile of the CGM values.

Gframe.iqr([per_day, interpolation])

Calculates the Interquartile Range (IQR) of the CGM values.

Gframe.modd([target_time, slack, ignore_na])

Calculates the Mean of Daily Differences (MODD).

Gframe.tir([per_day, interval, percentage, ...])

Calculates the Time in Range (TIR) for a given target range of glucose.

2. Analysis of distribution in the plane for glycaemia dynamics#

Gframe.fd([per_day, interval, decimals, count])

Calculates the Frequency Distribution (Fi) for a given target range of glucose.

Gframe.auc([per_day, time_unit, threshold, ...])

Calculates the Area Under the Curve (AUC) using the trapezoidal rule.

3. Amplitude and distribution of frequencies metrics for glycaemia dynamics#

Gframe.mage([per_day])

Calculates the Mean Amplitude of Glycaemic Excursions (MAGE).

Gframe.dt([per_day])

Calculates the Distance Travelled (DT).

4. Metrics for the analysis of glycaemic dynamics using scores of glucose values#

Gframe.bgi([per_day, index_type, maximum])

Calculates the Low Blood Glucose Index (LBGI) or the High Blood Glucose Index (LBGI).

Gframe.hbgi([per_day, maximum])

This is an alias for glucopy.Gframe.bgi() with index_type='h'.

Gframe.lbgi([per_day, maximum])

This is an alias for glucopy.Gframe.bgi() with index_type='l'.

Gframe.adrr()

Calculates the Average Daily Risk Range (ADRR).

Gframe.grade([percentage])

Calculates the contributions of the Glycaemic Risk Assessment Diabetes Equation (GRADE) to Hypoglycaemia, Euglycaemia and Hyperglycaemia.

Gframe.qscore([slack])

Calculates the Q-Score.

5. Metrics for the analysis of glycaemic dynamics using variability estimation#

Gframe.mard(smbg_df[, slack, interpolate])

Calculates the Mean Absolute Relative Difference (MARD).

Gframe.conga([per_day, m, slack, ignore_na, ...])

Calculates the Continuous Overall Net Glycaemic Action (CONGA).

Gframe.gvp()

Calculates the Glucose Variability Percentage (GVP), with time in minutes.

Gframe.mag([per_day, time_unit])

Calculates the Mean Absolute Glucose Change per unit of time (MAG).

6. Computational methods for the analysis of glycemic dynamics#

Gframe.dfa([per_day, scale, overlap, ...])

Calculates the Detrended Fluctuation Analysis (DFA) using neurokit2.fractal_dfa().

Gframe.samp_en([per_day, delay, dimension, ...])

Calculates the Sample Entropy using neurokit2.entropy_sample()

Gframe.mse([per_day, scale, dimension, ...])

Calculates the Multiscale Sample Entropy using neurokit2.entropy_multiscale()