-
Notifications
You must be signed in to change notification settings - Fork 36
KDtree from NearestNeighbors.jl #71
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
Comments
The KD trees in a Loess are used differently. To cite https://link.springer.com/article/10.1007/BF01890836
Maybe it's possible to use the KD-tree implementation from |
Good point, instead of doing least-squares for all n, loess approximates the curve by only doing it for the vertices. I was aware of this approximation, but I didn't know it was being done by exploiting kdtrees for this. Pretty clever.
You may not get identical results, but conceptually, some differences in the splitting rule won't matter. I think the same about the stopping rule, but I am not entirely sure. I think the stopping rule that they have chosen is to help make the FORTRAN implementation simpler.
We don't have this constraint in Julia. But depth-first will conceptually change things a little, perhaps for the better. In summary, I believe using NearestNeighbors.jl may not lead to the identical approximation as the one already implemented in the package, but it's the same idea. It's not critical to move to NearestNeighbors.jl as the existing implementation works. Also, it can't lead to a big speedup, as more of the time is presumably spent on least-squares. However, moving to NearestNeighbors.jl will lead to simplification of src, and upstream improvements. Perhaps it should be done in a new Loess package, and not in this. |
Indeed, but it makes it easier to test since we can then just compare with R's |
Uh oh!
There was an error while loading. Please reload this page.
NearestNeighbors.jl implements KDtree. In loess, we primarily need to find the points within the span of a given point. This can be done via
NearestNeighbors.inrange
.Using KDtrees from NearestNeighbors will lead to simplification in Loess.jl src.
The text was updated successfully, but these errors were encountered: