View source for User talk:Jdev/Code/R Tree

From Robowiki
Jump to navigation Jump to search

Contents

Thread titleRepliesLast modified
Performance?1019:41, 22 December 2011

Performance?

I'm curious, have you measured the performance of this r-tree? During my extensive nearest neighbor search experiments in the past, I did make an attempt at an r-tree, but I found at least my impelementation to provide far inferior performance to my bucket kd-tree.

Rednaxela21:24, 20 December 2011

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:User talk:Jdev/Code/R Tree/Performance?/reply.

 

How about seeing how many points are returned by the RS, and seeing how long it takes with that many points for kNN in comparison?

I've been considering testing RS in DrussGT instead of all of those movement buffers, but I'm too busy at the moment...

Skilgannon09:33, 21 December 2011
 

I did the exactly same. Something like this: E[] arr1 = rTree.rangeSearch(getRange(currentLoc)); E[] arr2 = kDTree.nearestNeighbor(currentLoc, arr1.length)

Jdev10:50, 21 December 2011
 

I'm curious, the does the RS give the same results? Or does the kNN return points in a hypersphere, whereas the RS gives results in a hypercube?

Skilgannon12:00, 21 December 2011
 

Now i'm curious too, but i hope, that results will pretty same:) I will publish results, when i will try it

Jdev12:03, 21 December 2011

Hmm... that performance difference is fairly expected. kNN spends a lot of time doing distance calculations that RS doesn't need to do. Also, just a note.... I think the questions of using r-trees vs kd-trees should be separate from whether RS or kNN is used. I say that because well... both types of trees can do both types of searches.

Rednaxela22:11, 21 December 2011
 

I completely agree with you. But i think, that r-tree is faster with RS, but kD-tree is faster with kNN

Jdev05:32, 22 December 2011

That's an interesting theory, could perhaps be the case. I might test that some time.

Rednaxela08:12, 22 December 2011
 

I think that range searches would definitely be faster using R-trees. In a range search, you could add every point within the rectangle of an R-tree without calculating any distances for those points. Of course, your tree uses minimum bounding rectangles so you could do that too, but a normal kd-tree couldn't. For a kNN search the main advantage of an R-tree is probably the ease with which you can rebalance the tree.

AW17:53, 22 December 2011

Good point about the minimum bounding rectangles. Thinking about it some more, I suspect that the RS speed of a kd-tree that uses minimum bounding rectangles, would be extremely similar to that of a R-tree really. Sure, the partitioning is a bit different but both have reasonable enough partitioning and with the minimum bounding rectangles the search algorithm would basically be the same.

Yeah, that rebalancing aspect is what prompted me to do some r-tree experiments in the past.

Rednaxela19:41, 22 December 2011