JuliaDynamics/DelayEmbeddings.jl

Pointless index-returns from `all_neighbors`

hkraemer opened this issue · 2 comments

The function all_neighbors returns pointless indices and according nearest neighbor values of -Inf, when the Theiler window and the length of the dataset do not allow an approariate declaration of Knearest neighbors. Specifically, that happens, when the Theiler window is large compared to the time series length. It would be better to assert that this does not happen, or at least throw a meaningful error in this case.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Hm, I agree with you that all_neighbors should just throw an error when this happens. Easy to fix with a PR I feel!

You can throw errors with error("Whatever message")