Difference between revisions of "Range Search"

From Robowiki
Jump to navigation Jump to search
m (some cleanup; let me know if you don't like it.)
m (spelling and grammar corrections, I was unsure what you meant in some places. I did my best to change these, but you should make sure I didn't remove anything you wanted to keep.)
Line 1: Line 1:
'''Range search''' is a data analysis algorithm, which is very similar to [[Dynamic Clustering|k-NN]]. The main difference is that k-NN increases area (sphere or hypercube) until it contains required amount of data points, but range search do not do it.
+
'''Range search''' is a data analysis algorithm, which is very similar to [[Dynamic Clustering|k-NN]]. The main difference is that k-NN gets a fixed number of data points while range search does not.
  
 
== How it works ==
 
== How it works ==
Record state (aka situation, turn snapshot, etc.) with some set of attributes (velocity, acceleration, x, y, etc.). When you need in data, calculate some hypercube with center in current situation. For example current situation is {velocity = 8, acceleration = 0, x = 200, y = 200}, then hypercube can be described as set if intervals {[6;8], [0;0], [180; 220], [180, 220]}. Then iterate through all data and select these points, which are contained by this hypercube. Then use this data points for targeting, movement or elsewhere
+
Record state (aka situation, turn snapshot, etc.) with some set of attributes (velocity, acceleration, x, y, etc.). When you need data, calculate some hypercube centered at the current situation. For example, if the current situation is {velocity = 8, acceleration = 0, x = 200, y = 200}, then hypercube can be described as the set of intervals {[6,8], [0,0], [180, 220], [180, 220]}. Then iterate through all data and select the points that are contained by this hypercube. Then use these data points for targeting, movement, etc.
  
 
== Advantages ==
 
== Advantages ==
The main advantage against knn algorithm is getting only corresponding data. k-NN algorithm can get too many not corresponding data, until gets ''k'' data points or get too little corresponding data, if ''k'' is much lesser, then data points around current situation
+
The main advantage of range search over the k-NN algorithm is that range search gets only corresponding data. The k-NN algorithm can getdata points that do not correspond to the current situation if k is too high for the current data, or it can get too little corresponding data, if ''k'' is much less than the number of data points 'around' the current situation
  
 
== Illustrations ==
 
== Illustrations ==
Line 11: Line 11:
 
* little black dots - data points
 
* little black dots - data points
 
* big red dots - current situation
 
* big red dots - current situation
* red areas - area of data points which used for data analysis
+
* red areas - area of data points used for data analysis
 
{| border="1" cellspacing="0" cellpadding="5"
 
{| border="1" cellspacing="0" cellpadding="5"
 
| [[File:Knn.gif|K nearest neighbours algorithm]] || [[File:Rs.gif|Range search algorithm]] || [[File:Vcs.gif|Visit count stats algorithm]]
 
| [[File:Knn.gif|K nearest neighbours algorithm]] || [[File:Rs.gif|Range search algorithm]] || [[File:Vcs.gif|Visit count stats algorithm]]

Revision as of 17:30, 8 August 2011

Range search is a data analysis algorithm, which is very similar to k-NN. The main difference is that k-NN gets a fixed number of data points while range search does not.

How it works

Record state (aka situation, turn snapshot, etc.) with some set of attributes (velocity, acceleration, x, y, etc.). When you need data, calculate some hypercube centered at the current situation. For example, if the current situation is {velocity = 8, acceleration = 0, x = 200, y = 200}, then hypercube can be described as the set of intervals {[6,8], [0,0], [180, 220], [180, 220]}. Then iterate through all data and select the points that are contained by this hypercube. Then use these data points for targeting, movement, etc.

Advantages

The main advantage of range search over the k-NN algorithm is that range search gets only corresponding data. The k-NN algorithm can getdata points that do not correspond to the current situation if k is too high for the current data, or it can get too little corresponding data, if k is much less than the number of data points 'around' the current situation

Illustrations

Legend:

  • little black dots - data points
  • big red dots - current situation
  • red areas - area of data points used for data analysis
K nearest neighbours algorithm Range search algorithm Visit count stats algorithm
k-nearest neighbours algorithm Range search algorithm Visit Count Stats algorithm

See also