JuliaDynamics / TimeseriesSurrogates.jl

A Julia package for generating timeseries surrogates
https://juliadynamics.github.io/TimeseriesSurrogates.jl/stable/
Other
47 stars 9 forks source link

Is the repo active? #24

Closed Datseris closed 4 years ago

Datseris commented 4 years ago

Hi, I'd like to do some contributions to the repo. Is it active / maintained?

kahaaga commented 4 years ago

Hi, it is active indeed! Contributions are very welcome. What did you have in mind?

Datseris commented 4 years ago

I think the following would be useful:

  1. Rework/rethink API: have central function surrogate(s, method::Surrogate) that creates a surrogate based on given method, e.g. Shuffle, RandomAmplitude, RandomPhase, AAFT , IAAFT, etc. It will make it more sensible to use, because changing method to generate timeseries in a forloop means changeing a funciton argument, not the function itself
  2. improve plotting: the histograms must be semi-transparent, otherwise the histogram of the first timeseries is not seen.
  3. add this method: https://journals.aps.org/pre/abstract/10.1103/PhysRevE.74.026205
  4. add this method: Small, M., Yu, D., & Harrison, R. G. (2001). Surrogate test for pseudoperiodic time series data. Physical Review Letters, 87(18), 188101-1-188101–188104. https://doi.org/10.1103/PhysRevLett.87.188101

You may also want to consider moving this to JuliaDynamics to get help from more people and more visibility.

kahaaga commented 4 years ago

1. New API:

I like the surrogate(s, method::Surrogate) function and the associated types. Something like the following?

abstract type Surrogate end

struct Shuffle
end

function surrogate(s, method::Shuffle)
    # code specific to the `Shuffle method` 
end

2. Plotting

Agreed, histograms should be semi-transparent.

3 and 4. New methods

I had a quick look at the papers, and both the surrogates for trended time series, and the pseudoperiodic surrogates are welcome contributions.

PPS surrogates

Truncated fourier transform surrogates

From the Nakamura et al. paper, there should be two separate methods: one for the truncated Fourier transform surrogates (TFTS) and the symmetrized version (STFTS). I think the selected frequency domain should be field of both these types.

Does that sound reasonable, @Datseris?

Joining JuliaDynamics

Moving the repository to JuliaDynamics is also a good idea. I'll transfer it to the organization straight away (I'm already added to the organization in the causalitytools team, right?).

Datseris commented 4 years ago

good, I've given you admin rights straight away. If you don't mind I am also part of the same team, so I can branch the repo in-place. But I won't be merging anything you don't approve!

kahaaga commented 4 years ago

Sure, sounds good!