LRydin / MFDFA

Multifractal Detrended Fluctuation Analysis in Python
MIT License
128 stars 27 forks source link

Colored Noise Singularity Spectrum Issues #34

Closed rsautter closed 2 years ago

rsautter commented 2 years ago

There is negative alpha values when testing colored noise series of size 2**15, in a set of q = np.array([5,6,7,8,9]) , with MFDFA==0.4.2.

LRydin commented 2 years ago

That somewhat does not sound too surprising, there is a small issue with testing noise directly due to the regularity of the process. Could you try and introduce instead X (the time series) into MFDFA but intead np.cumsum(X)?


The point is that when you consider a non-integrated process, e.g., just noise, the process has a regularity which is -1 of an integrated process (the difference between a noise and a motion). This leads to α → α - 1. Are the negative values of α larger than -1?

LRydin commented 2 years ago

NB: Need to add a flag to singularity_spectrum and all related measures to ensure noise is treated with according regularity.

LRydin commented 2 years ago

@rsautter I've corrected this issue in the new version v0.4.3. You can use pip to bump to this newer version:

pip install --upgrade MFDFA

Hopefully this solves your issue.

rsautter commented 2 years ago

It's working! Thanks