pyActigraphy.metrics.MetricsMixin.average_daily_activity

MetricsMixin.average_daily_activity(freq='5min', cyclic=False, binarize=True, threshold=4, time_origin=None, whs='1h')[source]

Average daily activity distribution

Calculate the daily profile of activity. Data are averaged over all the days.

Parameters
  • freq (str, optional) – Data resampling frequency. Cf. #timeseries-offset-aliases in <https://pandas.pydata.org/pandas-docs/stable/timeseries.html>.

  • cyclic (bool, optional) – If set to True, two daily profiles are concatenated to ensure continuity between the last point of the day and the first one. Default is False.

  • 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.

  • time_origin (str or pd.Timedelta, optional) – If not None, origin of the time axis for the daily profile. Original time bins are translated as time delta with respect to this new origin. Default is None Supported time string: ‘AonT’, ‘AoffT’, any ‘HH:MM:SS’

  • whs (str, optional) – Window half size parameter for the detection of the activity onset/offset time. Relevant only if time_origin is set to ‘AonT’ or AoffT’. Default is ‘1h’.

Returns

raw – A Series containing the daily activity profile with a 24h index.

Return type

pandas.Series