Re: Nearest neighbours
- From: Kaba <none@xxxxxxxx>
- Date: Tue, 14 Apr 2009 03:36:37 +0300
Nicolas Bonneel wrote:
Please, don't do bruteforce (except if you do it on gpu...) - it will be
far too slow!!
I now know that it is the all-k-nearest-neighbors that I need. I have
implemented 4 algorithms:
1) Brute force
2) Axis-projection based
3) kd-tree (with sliding midpoing rule, exact matches)
4) All-nearest-neighbors algorithm
The 4) is from the paper:
http://tinyurl.com/ddfqke
My timing results indicate that the kd-tree outperforms all methods by
far. In the following I assume the point set consists of 10000 points
generated uniformly inside a hyperball.
Algorithm 4) has exponential dependence on dimension: already in
dimension 4 brute force outperforms this algorithm. In dimension 2 kd-
tree outperforms 4) by a factor of 4x. In dimension 3 the factor is
about 21x. In short, I wouldn't recommend it to anyone.
The only algorithms that adapt to higher dimensions are the kd-tree and
the brute force. Dimension 20 is no problem for either, taking brute
force 20 seconds, and kd-tree 31 seconds. Brute force algorithm
outperforms kd-tree from dimension 12 where the performances are nearly
equal. Take dimension 12 and vary point set size: then the performances
stay nearly equal (tested up to 20000 points). I didn't expect this.
While kd-tree has impressive adaptability, dimension 11 seems to be as
high as one can go with it. This leads me to believe that there does not
exist an algorithm that can answer exact nearest neighbor queries faster
than brute-force in dimensions >= 12. Thus my only hope for making those
higher dimensions faster is now on
1) approximate nearest neighbors queries, and
2) parallel computation
Parallel computation brings us to GPUs. Would you think that it is
possible to implement an n-dimensional kd-tree on a GPU and use it to
solve this problem?
--
http://kaba.hilvi.org
.
- Follow-Ups:
- Re: Nearest neighbours
- From: Nicolas Bonneel
- Re: Nearest neighbours
- References:
- Nearest neighbours
- From: Kaba
- Re: Nearest neighbours
- From: Nicolas Bonneel
- Nearest neighbours
- Prev by Date: Re: 3D reconstruction.
- Next by Date: Re: Order of growth?
- Previous by thread: Re: Nearest neighbours
- Next by thread: Re: Nearest neighbours
- Index(es):
Relevant Pages
|