pyActigraphy.metrics.MetricsMixin.IV

MetricsMixin.IV(freq='1H', binarize=True, threshold=4)[source]

Intradaily variability

The Intradaily Variability (IV) quantifies the variability of the activity recording. This variable thus measures the rest or activity fragmentation.

Parameters
  • freq (str, optional) – Data resampling frequency string. Default is ‘1H’.

  • binarize (bool, optional) – If set to True, the data are binarized. Default is True.

  • threshold (int, optional) – If binarize is set to True, data above this threshold are set to 1 and to 0 otherwise. Default is 4.

Returns

iv

Return type

float

Notes

It is defined in ref [1]:

\[IV = \frac{c^{1h}}{d^{1h}}\]

with:

\[d^{1h} = \sum_{i}^{n}\frac{\left(x_{i}-\bar{x}\right)^{2}}{n}\]

where \(x_{i}\) is the number of active (counts higher than a predefined threshold) minutes during the \(i^{th}\) period, \(\bar{x}\) is the mean of all data and \(n\) is the number of periods covered by the actigraphy data,

and with:

\[c^{1h} = \sum_{i}^{n-1} \frac{ \left( x_{i+1} - x_{i} \right)^{2} }{n-1}\]

References

1

Witting W., Kwa I.H., Eikelenboom P., Mirmiran M., Swaab D.F. Alterations in the circadian rest–activity rhythm in aging and Alzheimer׳s disease. Biol Psychiatry. 1990;27:563–572.

Examples

>>> import pyActigraphy
>>> rawAWD = pyActigraphy.io.read_raw_awd(fpath + 'SUBJECT_01.AWD')
>>> rawAWD.IV()
0.46185426426324316
>>> rawAWD.IV(freq='30min', binarize=True, threshold=4)
0.4150769573937417
>>> rawAWD.IV(freq='1H', binarize=False)
0.7859579446494547