pyActigraphy.analysis.Fractal.mfdfa¶
- classmethod Fractal.mfdfa(ts, n_array, q_array, deg=1, overlap=False, exclude_segment_with_nans=False, nan_frac=0, log=False)[source]¶
Multifractal Detrended Fluctuation Analysis function
Compute the q-th order mean squared fluctuations for different segment lengths and different index q values.
- Parameters:
ts (pandas.Series) – Input signal.
n_array (array of int) – Time scales (i.e window sizes). In minutes.
q_array (array of float) – Orders of the mean squares.
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.
exclude_segment_with_nans (bool, optional) – If set to True, segments containing a NaN fraction equal or greater than nan_frac are excluded. Default is False.
nan_frac (float, optional) – Threshold on the maximal fraction of NaN in the returned segments. Default is 0.
log (bool, optional) – If set to True, returned values are log-transformed. Default is False.
- Returns:
q_th_order_msq_fluctuations – (n,q) array of q-th order mean squared fluctuations.
- Return type:
numpy.array