glucopy.Gframe.samp_en#

Gframe.samp_en(per_day: bool = False, delay: int | None = 1, dimension: int | None = 2, tolerance: float | str | None = 'sd', **kwargs)[source]#

Calculates the Sample Entropy using neurokit2.entropy_sample()

For more information on the parameters and details see neurokit2.complexity.entropy_sample().

Parameters:
  • per_day (bool, default False) – If True, returns a pandas.Series with the Sample Entropy for each day. If False, returns the Sample Entropy for the entire dataset.

  • others – For more information on the rest of the parameters see neurokit2.complexity.entropy_sample().

Returns:

samp_en – Entropy Sample.

Return type:

float | pandas.Series

Examples

Calculating the Sample Entropy for the entire dataset:

In [1]: import glucopy as gp

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

In [3]: gf.samp_en()
Out[3]: 0.6304986341428531

Calculating the Sample Entropy for each day:

In [4]: gf.samp_en(per_day=True)
Out[4]: 
Day
2020-11-27        -inf
2020-11-28    0.709676
2020-11-29    0.628609
2020-11-30    0.508413
2020-12-01    0.599251
                ...   
2021-03-14    0.545338
2021-03-15    0.405465
2021-03-16    0.578078
2021-03-17    0.536421
2021-03-18    0.344840
Name: Entropy Sample, Length: 112, dtype: float64