neurodsp.aperiodic.dfa.compute_detrended_fluctuation¶
- neurodsp.aperiodic.dfa.compute_detrended_fluctuation(sig, win_len, deg=1)[source]¶
Compute detrended fluctuation of a time series at the given window length.
- Parameters:
- sigarray
Time series.
- win_lenint
Window length for each detrended fluctuation fit, in samples.
- degint, optional, default=1
Polynomial degree for detrending.
- Returns:
- det_flucfloat or 1d array
Measured detrended fluctuation, as the average error fits of the window.
Notes
DFA was originally proposed in [1].
There is a relationship between DFA measures and 1/f exponent, as detailed in [2].
References
[1]Peng, C.-K., Buldyrev, S. V., Havlin, S., Simons, M., Stanley, H. E., & Goldberger, A. L. (1994). Mosaic organization of DNA nucleotides. Physical Review E, 49(2), 1685–1689. DOI: https://doi.org/10.1103/PhysRevE.49.1685