Comments (3)
So the tree search method doesn't provide any side effects like order by distance for free?
For knn
, yes but for in_range
it is possible to determine that all points in a branch of the tree are in range without having to compute the distance for all points in that branch.
from nearestneighbors.jl.
See:
Note that for performance reasons the distances are not returned.
inrange
is made fast is by not computing the distances when that is not needed to know if the point is in range or not. You would need to call the distance function on all points yourself afterwards since that is not any information we have stored anywhere.
FWIW, the sortres
option for inrange
should probably be removed, it doesn't really do anything useful.
from nearestneighbors.jl.
FWIW, the
sortres
option forinrange
should probably be removed, it doesn't really do anything useful.
I agree, I thought the option was doing the sort by distance. I would just remove it to avoid future confusion by other users.
So the tree search method doesn't provide any side effects like order by distance for free? I will call inrange
, and then calculate the distances if that is needed. Thanks.
from nearestneighbors.jl.
Related Issues (20)
- Querying a vector of NaN occasionally results in invalid indices HOT 5
- Bug: BoundsError when skipping all entries HOT 1
- periodic kdtree or balltree HOT 5
- Benchmarking parallel implementation leads to segfaults HOT 2
- No constructor for NNTree HOT 2
- Nearest Neighbors in a very large dataset. HOT 1
- mutual nearest neighbors HOT 3
- [FR] Classifier function
- BallTree and KDTree do not accept Vector{AbstractVector{Float64}} Type. Possible bug. HOT 1
- knn: skipped items output when there is a skip function has always the last index and not 0 index HOT 3
- `nn` lacking docstring HOT 1
- AssertionError in kmedoids alg
- bug: BoundsError when the skip function returns true for all points HOT 3
- Is there a reason sqeuclidean distance is not supported? HOT 4
- README.md Misleading Custom Metric Documentation
- Document that `inrangecount` also counts the point itself HOT 2
- [Question] Can you insert new data into an existing KDTree object? HOT 2
- Compilation time issues with very high dimensions HOT 3
- Reverse Cuthill-McKee ordering option HOT 1
- Querying number of distance evaluations HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nearestneighbors.jl.