Skip to content

Add validation tests for DFA scaling exponent#463

Merged
ThomasMBury merged 4 commits intoThomasMBury:mainfrom
Oberon245:feature/dfa-implementation
Apr 3, 2026
Merged

Add validation tests for DFA scaling exponent#463
ThomasMBury merged 4 commits intoThomasMBury:mainfrom
Oberon245:feature/dfa-implementation

Conversation

@Oberon245
Copy link
Copy Markdown

This PR adds validation tests for the existing Detrended Fluctuation Analysis (DFA) implementation in helpers.dfa.

The tests verify expected scaling behaviour using synthetic signals:

  • White noise → α ≈ 0.5
  • Brownian motion → α ≈ 1.5

Additional tests cover:

  • behaviour on short time series
  • determinism of output
  • integration with the TimeSeries API

DFA follows the algorithm introduced in Peng et al. (1994), and these tests ensure expected scaling behavior is preserved.

@ThomasMBury ThomasMBury merged commit 4906ebc into ThomasMBury:main Apr 3, 2026
4 checks passed
@ThomasMBury
Copy link
Copy Markdown
Owner

Hi Robin,

Thank you very much for adding DFA to ewstools! This is a really nice addition that will be valuable for users. We could also consider adding a short Jupyter notebook tutorial to demonstrate how to use it.

Thanks again for the contribution - much appreciated.

Tom

@Oberon245
Copy link
Copy Markdown
Author

Oberon245 commented Apr 4, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants