Surrogate methods
Random shuffle surrogates
#
TimeseriesSurrogates.randomshuffle
— Function.
randomshuffle(a::AbstractArray{Number, 2}; cols = 1:size(d, 2))
Column-wise random shuffle surrogate of an array, where each column is a scalar-valued time series. cols
controls which variables of the embedding are shuffled.
randomshuffle(E::Embeddings.AbstractEmbedding;
cols = 1:size(E.points, 1))
Column-wise random shuffle surrogate of an embedding. cols
controls which variables of the embedding are shuffled.
randomshuffle(d::DynamicalSystemsBase.Dataset; cols = 1:size(d, 2))
Column-wise random shuffle surrogate of a Dataset. cols
controls which variables of the embedding are shuffled.
Example
npts = 100
ts = sin.(diff(rand(npts + 1)))*0.5 .+ cos.(LinRange(0, 8*pi, npts))
p1 = plot(ts, label = "ts", lc = :black)
p2 = plot(randomshuffle(ts), label = "randomshuffle(ts)", xlabel = "Time step")
plot(p1, p2, layout = (2, 1))
ylabel!("Value");