JuliaDynamics / FractalDimensions.jl

Estimating the fractal dimension of timeseries or multidimensional datasets
MIT License
10 stars 3 forks source link

Fractal dimension from extreme value theory fitting #5

Closed Datseris closed 1 year ago

Datseris commented 1 year ago

Recently it has become rather fancy in the literature to compute a flavor of the local fractal dimension using a fit based on extreme value theory. Davide Faranda, which is the main authority on the method, has shared the following two resources:

For a paper describing the method and how to extract it from data: https://www.nature.com/articles/srep41278 . What we want is the "Methods" section, and "Instanteneous dimension" and "persistence" subsections. Some clarification for the paper: ζ is the state space vector (which, for the paper, is the whole spatial field at a given time). So for us ζ is just an element of an input Dataset.

And a simple code to compute it in Matlab: https://fr.mathworks.com/matlabcentral/fileexchange/95768-attractor-local-dimension-and-local-persistence-computation

pdist2 in the Matlab code is pairwise Euclidean distance. It means that from the given point ζ (in matlab this is this weird x(j,:)) we compute the distance to all other points in the data. Oddly, the matlab code does not skip the point itself, meaning that you always (and wrongly) have a 0 distance. The matlab code also doesnt include the theiler window, which I would assume would make the estimates bad. In any case, translating the Matlab code to Julia is trivial. I am wondering whether we could do any optimizations to the code so that we can skip computing pairs all the time...?

Datseris commented 1 year ago

And since the paper is open access, here are the relevant sections:

image

image

image