A k-d-tree (k-dimensional tree) is a data structure for storing points in multidimensional space. They can be used to efficiently query for whether a point exists, as well as to do Euclidean nearest-neighbor searches and searches inside of hyperdimensional rectangular regions.
Questions tagged [kdtree]
457 questions
0
votes
1 answer
Finding the first element with a specific distance
I'm trying to write a method, which will return the index of a point which is closest to another point in 3D space. The points are stored in a KD-tree and I'm comparing them with the point p which is a parameter of my method. Here is the…

TheAptKid
- 1,559
- 3
- 25
- 47
0
votes
1 answer
Finding All Neighbours within Range using KD-tree
I am trying to implement a KD-tree for use with DBSCAN. The problem is that I need to find all the neighbours of all points that meet a distance criteria. The problem is I don't get the same output when using the naive search (which is the desired…

Jonno_FTW
- 8,601
- 7
- 58
- 90
0
votes
1 answer
How to use k-d tree to find nearest neighbor?
I have applied SIFT on one image and got descriptors, then I have used Euclidean distance to find similar descriptors, now I want to use k-d tree to find which descriptors are more similar and reprocess them in a data structure. Please help me how I…

user615864
- 1
- 2
0
votes
2 answers
Finding points in space closer than a certain value
In an python application I'm developing I have an array of 3D points (of size between 2 and 100000) and I have to find the points that are within a certain distance from each other (say between two values, like 0.1 and 0.2). I need this for a…

pygabriel
- 9,840
- 4
- 41
- 54
0
votes
1 answer
Scipy.Spatial.KDTree.query - large dataset issues
I am playing with the KDQuery function in SciPy.Spatial. I have an issue once my data sizes get really large. I realize that the algorithm is not necessarily designed to be efficient for large datasets, but it appears (from the source) that size…

Jzl5325
- 3,898
- 8
- 42
- 62
0
votes
1 answer
How to serialize and deserialize a kdtree in java
I have a kdtree whose nodes consist of the following fields:
public static class Node implements Serializable
{
public int discriminator;
public double value;
public Node leftChild;
public Node rightChild;
public DataPoint…

Esha Ghosh
- 147
- 1
- 2
- 11
0
votes
0 answers
Quadtree and kd-tree splitting and mandelbrot set?
I've read about a quadtree or kd-tree splitting and a mandelbrot set but what when the rectangle before the first split and the frame lies in the mandelbrot set or has the same iteration depth and the algorithm returns from tiling? How can I force…

Micromega
- 12,486
- 7
- 35
- 72
0
votes
1 answer
kd tree build sort optimize
The algorithm build of kd-tree implemented in the Python programming language is as follows (from http://en.wikipedia.org/wiki/K-d_tree):
class Node: pass
def kdtree(point_list, depth=0):
if not point_list:
return None
# Select axis based…

Fandorin
- 31
- 5
0
votes
1 answer
Building a k-d tree using MapReduce?
I am trying to build the KD tree(independent) for image features. I have extracted the image features,the feature contains suppose 1000 float values.
Using map-reduce to distribute the images among the nodes of the cluster according to…

Amnesiac
- 661
- 1
- 10
- 30
0
votes
1 answer
CBIR with SIFT alike features, discrete- vs. continuous-approach
currently I'm dealing with implementing a CBIR-System for object recognition (object classification in detail) and now since I have some working feature-detectors and -descriptors I try to find the best way for handling these features for the task…

Hans Sperker
- 1,347
- 2
- 15
- 37
0
votes
1 answer
How to implement with OO a set of keys in C++ for a kdtree
I need to implement a B+ tree which is adapted to be a k-d tree. As a short
explanation of this, a k-d tree is like a binary tree except that at its
nodes it has a multi-valued key, that is a key with several values. And it will
also be a B+ tree…

Ale
- 23
- 6
-1
votes
0 answers
Finding nearest neighbour words (synonyms) in a BERT model
I'm looking to recreate the BERT synonyms assessment found in this paper (https://www.mdpi.com/2673-6470/2/4/30), where from what I gather, the following steps need to be taken:
Pairwise similarities between all the words in BERT’s vocabulary are…

Jon
- 89
- 6
-1
votes
1 answer
2D data point range query
I am working with a huge 2d dataset and need a range query for every point, returning the neighbours within a range as a set
I already have tested using an index with KD Tree form sk learn, but the problem is, it returns the index as a list and the…

Felix Ha
- 401
- 5
- 11
-1
votes
1 answer
Same Python code , different performance
I wrote this code in Python and there's something driving me crazy. The same code when I put in function, give me different results!! How that can be? This is the code in the main and the same code in a function
def iterateTesting(k):
Accuracy =…

GoofyFoot
- 29
- 1
- 3
-1
votes
2 answers
Duplicate nodes when removing from kdtree
I am writing an algorithm that requires me to search nearest neighbors of points. I found the kdtree library from this post (Using Google's C KD Tree Library) but it does not have a function to delete individual nodes from the tree. So I started to…

meetaig
- 913
- 10
- 26