Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nearest Trajectory Strategy for Time Series Prediction #73

Open
Datseris opened this issue Feb 22, 2019 · 2 comments
Open

Nearest Trajectory Strategy for Time Series Prediction #73

Datseris opened this issue Feb 22, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@Datseris
Copy link
Member

Datseris commented Feb 22, 2019

image

Currently the scheme for finding nearest neighbors works by not distinguishing neighbors based on where they are with respect to the existing dataset. Most of the time (and this is especially true for densely sampled data), nearest neighbors belong to a single or at best a couple of trajectory segments. This may mean that a specific trajectory segment is over-weighted for the prediction while other nearing segments are disregarded. The figure describes this perfectly.

It can be advantageous in some cases of timeseries predictions to expand the neighbor-finding strategy to "Nearest Trajectory". This process is described in the paper: "A Nearest Trajectory Strategy for Time Series Prediction" by James McNames. You can find the pdf here.


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

@Datseris Datseris added the enhancement New feature or request label Feb 22, 2019
@Datseris
Copy link
Member Author

I do believe that it is not hard to implement a new neighborhood type that does this. It will be slow of course but it can work by finding some "test" neighbors given a point, and then for each of the neighbors check if they are close to each other in data indices. If yes then add more nearest neighbors incrementally.

Maybe the interface for this in NearestNeighbors is really poor though...

@JonasIsensee
Copy link
Member

This has little to do with the interface. Your suggestion disregards the inner workings of the search algorithm.

The only way to incrementally add more nearest neighbors would be to restart
the search with a larger k and consider the additional neighbors found.

It is likely much faster to just use a large k from the beginning so that researching becomes very rare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants