JuliaDynamics / ComplexityMeasures.jl

Estimators for probabilities, entropies, and other complexity measures derived from data in the context of nonlinear dynamics and complex systems
MIT License
49 stars 11 forks source link

Generalized interface for multivariate multiscale methods. #139

Open kahaaga opened 1 year ago

kahaaga commented 1 year ago

Describe the feature you'd like to have

With #132, we'll have a nice interface for computing any multiscale entropy or complexity measure of a timeseries x, as long as a relevant MultiScaleAlgorithm and corresponding downsample method is defined.

However, we haven't yet implemented methods for multivariate input. This is used for example in Morabito et al. (2012), where the compute the multivariate multiscale permutation entropy.

If possible, sketch out an implementation strategy

Implementing this is probably straight-forward. We just need to define downsample(::MultiScaleAlgorithm, x::AbstractDataset).

I'm just submitting this issue to remember actually doing so.

Cite scientific papers related to the feature/algorithm

Morabito, F. C., Labate, D., Foresta, F. L., Bramanti, A., Morabito, G., & Palamara, I. (2012). Multivariate multi-scale permutation entropy for complexity analysis of Alzheimer’s disease EEG. Entropy, 14(7), 1186-1202.

Datseris commented 1 year ago

downsample(a::MultiScaleAlgorithm, x::AbstractDataset) = Dataset(map(t -> downsample(a, t), columns(x))...) ?

kahaaga commented 1 year ago

downsample(a::MultiScaleAlgorithm, x::AbstractDataset) = Dataset(map(t -> downsample(a, t), columns(x))...) ?

Excellent. This will work generically. I'll add this to #132 straight away.

kahaaga commented 1 year ago

Reminder: we have two existing signature for probabilities(x::AbstractVector, est::SymbolicPermutation) and probabilities(x::AbstractDataset, est::SymbolicPermutation). The multivariate permutation approach (ignored the multi-scale aspect for now) conflicts with the latter. We need to decide on what to do about that. Perhaps it is best to replace the latter method with one that interprets each column of x as a timeseries, rather than interpreting the rows of x as pre-embedded state vectors to be symbolized.