skdh.activity.IntensityGradient#

class skdh.activity.IntensityGradient(state='wake')#

Compute the gradient of the acceleration movement intensity.

Parameters:
state{‘wake’, ‘sleep’}

State during which the endpoint is being computed.

Methods

predict(results, i, accel_metric, ...)

Saves the histogram counts for each bin of acceleration intensities.

reset_cached()

Generate the intensity gradient metrics from the cumulative data, and reset the attributes.

predict(results, i, accel_metric, accel_metric_60, epoch_s, epochs_per_min, **kwargs)#

Saves the histogram counts for each bin of acceleration intensities.

Parameters:
resultsdict

Dictionary containing the initialized results arrays. Keys in results are taken from the names of endpoints.

iint

Index of the day, used to index into individual result arrays, e.g. results[self.name][i] = 5.0

accel_metricnumpy.ndarray

Computed acceleration metric (e.g. ENMO).

accel_metric_60numpy.ndarray

Computed acceleration metric for a 60 second window.

epoch_sint

Duration in seconds of each sample of accel_metric.

epochs_per_minint

Number of epochs per minute.

reset_cached()#

Generate the intensity gradient metrics from the cumulative data, and reset the attributes.