Closed kahaaga closed 2 years ago
I don't think it makes sense to use PseudoPeriodic
with such timeseries. The method really targets periodic orbits, or approximately periodic orbits, with added noise on top. I.e. there must be a clear signal, or huge peaks in the fourier transform, for it to work.
Okay, I now what is happening here, gimme a second.
Yeap:
function pseudoperiodic!(y, x, z, w, ρ, shift)
N, Ñ = length.((x, z))
y[1] = shift ? rand(z.data) : z[1]
@inbounds for i in 1:N-1
w .= (exp(-norm(z[t] - y[i])/ρ) for t in 1:Ñ-1)
j = sample(1:Ñ-1, pweights(w))
y[i+1] = z[j+1]
end
return y[:, 1]
end
What I guess happens is that you always get the same j
in that algorithm after some point.
I am not sure whether this should be fixed. I actually don't know how to fix it. (I don't think we can call this a "fix": the method worked fine with periodic timeseries. With them there is no problem)
This method works for the intented type of time series. Closing.
(I'm on the
docs
branch, see #39 )For certain time series
gives
@Datseris Any idea why the orbit gets stuck in a small neighborhood? I am just naively picking some random value for
ρ
here, so it might just be because of my ignorance, but I seem to be able to reproduce this for different values ofρ
.If this is an issue inherent to the algorithm, perhaps this should be mentioned in the
PseudoPeriodic
docstring, or even discussed on thePseudoPeriodic
page.