Surrogate methods
Random amplitude Fourier surrogates
#
TimeseriesSurrogates.randomamplitudes
— Function.
randomamplitudes(a::AbstractArray{Number, 2}; cols = 1:size(d, 2))
Column-wise random amplitude Fourier surrogate of an array, where each column is a scalar-valued time series. cols
controls which variables of the embedding are shuffled.
randomamplitudes(E::Embeddings.AbstractEmbedding;
cols = 1:size(E.points, 1))
Column-wise random amplitude Fourier surrogate of an embedding. cols
controls which variables of the embedding are shuffled.
randomamplitudes(d::DynamicalSystemsBase.Dataset; cols = 1:size(d, 2))
Column-wise random amplitude Fourier surrogate of a Dataset. cols
controls which variables of the embedding are shuffled.
Example
# Generate a dynamical system, create an orbit and extract a time series from
# the first component.
s = CausalityTools.Systems.logistic3()
orbit = trajectory(s, 150)
x = orbit[:, 1]
# Compare original time series and random amplitude surrogate
p1 = plot(x, label = "x", lc = :black)
p2 = plot(randomamplitudes(x), label = "randomamplitudes(x)",
xlabel = "Time step")
plot(p1, p2, layout = (2, 1))
ylabel!("Value")