LRydin / MFDFA

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

Implement an Empirical Mode Decomposition method for detrending #3

Closed LRydin closed 4 years ago

LRydin commented 4 years ago

This is a method I first encountered in A Modified Multifractal Detrended Fluctuation Analysis (MFDFA) Approach for Multifractal Analysis of Precipitation in Dongting Lake Basin, China. The idea is simple, replace the polynomial fittings by an Empirical Mode Decomposition, a.k.a., Hilbert–Huang transform (HHT)

We thus have the choice of including as many of the intrinsic mode functions to perform the fitting. Naturally we have three fundamental things to find out:

LRydin commented 4 years ago

Generally all we have to do is to remove the polynomial fitting in line L128-129

# Perform a polynomial fit to each segments
p = polyfit(X[:i], Y_.T, order)
p_r = polyfit(X[:i], Y_r.T, order)

and feed the MFDFA instead of the actual timeseries, a detrended time series, in which one first calculated the IMFs, and them subtracts the IMFs from the timeseries.

galibhassan commented 4 years ago

PR #7

LRydin commented 4 years ago

Check PR galibhassan:EMDDetrending_without_GUI and now the new dev branch dev-emd.