MFDFA icon indicating copy to clipboard operation
MFDFA copied to clipboard

Implement also modification when q = 0

Open DominiqueMakowski opened this issue 1 year ago • 4 comments

In Faini 2021, they suggest a "seemingly simple" modification of the equation for when q = 0

image

Currently it seems like we do:

fluctuation = np.float_power(np.mean(np.float_power(var, q / 2), axis=1), 1 / q.T)

My fluency with equations is not there yet to be able to implement the adaptation, but if you have any ideas or leads I'm all ears :)

DominiqueMakowski avatar Jul 20 '22 01:07 DominiqueMakowski

Hey @DominiqueMakowski,

yeah, this was introduced already in the original MFDFA paper by Kantelhardt et at. ¹ in Eq. (6):

MFDFA

I haven't implemented this because of the usual uninterest of this particular measure. Admittedly there is a meaning associated with some measures at q=0. We can go back to one of the grounding papers in 1983 by Hentschel & Procaccia ²:

1983

Where D is the similarity dimension, σ the information dimension, and ν the correlation dimension.

It should be simple to implement, we just need to create a separate routine to perform the MFDFA at values close to q=0. Let me see if I find the patience to implement this, I go a vacation week coming up so it might take a bit :). It should look like:

fluctuation = np.exp(np.mean(np.log(var), axis=1))

(I haven't check this expression too thoroughly!)


¹ Kantelhardt, J. W., Zschiegner, S. A., Koscielny-Bunde, E., Havlin, S., Bunde, A., & Stanley, H. E. (2002). Multifractal detrended fluctuation analysis of nonstationary time series. Physica A: Statistical Mechanics and Its Applications, 316(1-4), 87–114. doi:10.1016/s0378-4371(02)01383-3 ² Hentschel, H. G. E., & Procaccia, I. (1983). The infinite number of generalized dimensions of fractals and strange attractors. Physica D: Nonlinear Phenomena, 8(3), 435–444. doi:10.1016/0167-2789(83)90235-x

LRydin avatar Jul 20 '22 08:07 LRydin

Thanks a lot for this additional info! I'll add your experimental expression to NK and will try to run some tests to see if it doesn't do anything weird, I'll link the PR to this issue and will report back how it goes :)

enjoy your holidays!

DominiqueMakowski avatar Jul 20 '22 08:07 DominiqueMakowski