pyActigraphy.analysis.Fractal.dfa¶
- classmethod Fractal.dfa(ts, n_array, deg=1, overlap=False, log=False)[source]¶
Detrended Fluctuation Analysis function
Compute the q-th order mean squared fluctuations for different segment lengths.
- Parameters
ts (pandas.Series) – Input signal.
n_array (array of int) – Time scales (i.e window sizes). In minutes.
deg (int, optional) – Degree(s) of the fitting polynomials. Default is 1.
overlap (bool, optional) – If set to True, consecutive windows during segmentation overlap by 50%. Default is False.
log (bool, optional) – If set to True, returned values are log-transformed. Default is False.
- Returns
q_th_order_msq_fluc – Array of q-th order mean squared fluctuations.
- Return type
numpy.array