glucopy.Gframe.summary#

Gframe.summary(auc_time_unit: str = 'm', mag_time_unit: str = 'h', slack: int = 0, decimals: int | None = 2)[source]#

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

Parameters:
  • auc_time_unit (str, default 'm' (minutes)) – The time unit for the calculation of AUC. Can be ‘s (seconds)’, ‘m (minutes)’, or ‘h (hours)’.

  • mag_time_unit (str, default 'h' (hours)) – The time unit for the calculation of MAG. Can be ‘s (seconds)’, ‘m (minutes)’, or ‘h (hours)’.

  • slack (int, default 0) – Maximum number of minutes that the given time can differ from the actual time in the data in the calculation of MODD, CONGA and Q-Score (uses MODD).

  • decimals (int | None, default 2) – Number of decimals to round the values to. If None, the values will not be rounded.

Returns:

summary – Summary of the metrics.

Return type:

pandas.DataFrame

Examples

Calculating the summary for the entire dataset and minutes as the time unit (default):

In [1]: import glucopy as gp

In [2]: gf = gp.data('prueba_1')

In [3]: gf.summary()
Out[3]: 
                                Metric        Value
0                                 Mean       144.28
1                   Standard Deviation        64.73
2             Coefficient of Variation         0.45
3                                  IQR        95.00
4                                 MODD        69.06
5              % Time below 70 [mg/dL]        11.24
6   % Time in between (70,180] [mg/dL]        61.04
7             % Time above 180 [mg/dL]        27.72
8                                  AUC  23075053.50
9                                 MAGE       121.68
10                   Distance Traveled    115800.00
11                                LBGI         5.74
12                                HBGI        13.51
13                                ADRR       101.97
14               GRADE Hypoglycaemia %        16.00
15                 GRADE Euglycaemia %         8.05
16              GRADE Hyperglycaemia %        75.95
17                             Q-Score        13.89
18                               CONGA        45.72
19                                 GVP        33.76
20                                 MAG        43.56
21                                 DFA         0.85
22                              SampEn         0.63
23                                 MSE         1.26