Skip to content

Commit dded226

Browse files
author
Fabian Pedregosa
committed
DOC: clearer doc for BallTree.
1 parent 7fe5131 commit dded226

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

doc/modules/neighbors.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,20 @@ Efficient implementation: the ball tree
7171
==========================================
7272

7373
Behind the scenes, nearest neighbor search is done by the object
74-
:class:`BallTree`, which is a fast way to perform neighbor searches in data
75-
sets of very high dimensionality.
74+
:class:`BallTree`. This algorithm makes it possible to rapidly look up
75+
the nearest neighbors in low-dimensional spaces.
7676

7777
This class provides an interface to an optimized BallTree
7878
implementation to rapidly look up the nearest neighbors of any point.
79-
Ball Trees are particularly useful for very high-dimensionality data,
80-
where more traditional tree searches (e.g. KD-Trees) perform poorly.
81-
82-
The cost is a slightly longer construction time, though for repeated
83-
queries, this added construction time quickly becomes insignificant.
84-
85-
A Ball Tree reduces the number of candidate points for a neighbor search
86-
through use of the triangle inequality:
79+
Ball Trees are particularly useful for low-dimensional data and scales
80+
better than traditional tree searches (e.g. KD-Trees) as the number of
81+
dimensions grow. However, on high-dimensional spaces (dim > 50), brute
82+
force will eventually take on and become more efficient on such spaces.
83+
84+
Compared to a KDTree, the cost is a slightly longer construction time,
85+
though for repeated queries, this added construction time quickly
86+
becomes insignificant. A Ball Tree reduces the number of candidate
87+
points for a neighbor search through use of the triangle inequality:
8788

8889
.. math:: |x+y| \leq |x| + |y|
8990

0 commit comments

Comments
 (0)