|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.tools.math.container.BallTree<T>
T - This is the type of value with is stored with the points and retrieved on nearest
neighbour searchpublic class BallTree<T extends java.io.Serializable>
This class is an implementation of a Ball-Tree for organizing multidimensional datapoints in a fashion supporting the search for nearest neighbours. This is only working well in low to middle number of dimensions. Since the building of the tree is very expensiv, in most cases a linear search strategy will outperform the ballTree in overall performance.
| Constructor Summary | |
|---|---|
BallTree(DistanceMeasure distance)
|
|
| Method Summary | |
|---|---|
void |
add(double[] values,
T storeValue)
This method has to be called in order to insert new values into the data structure |
T |
get(int index)
This returns the index-th value added to this collection. |
java.util.Collection<Tupel<java.lang.Double,T>> |
getNearestValueDistances(double withinDistance,
double[] values)
This method returns a collection of data from all sample points inside the specified distance. |
java.util.Collection<Tupel<java.lang.Double,T>> |
getNearestValueDistances(double withinDistance,
int butAtLeastK,
double[] values)
This method returns a collection of data from all sample points inside the specified distance but at least k points. |
java.util.Collection<Tupel<java.lang.Double,T>> |
getNearestValueDistances(int k,
double[] values)
This method returns a collection of data from the k nearest sample points. |
java.util.Collection<T> |
getNearestValues(int k,
double[] values)
This method returns a collection of the stored data values from the k nearest sample points. |
SimpleDataTable |
getVisualization()
|
java.util.Iterator<T> |
iterator()
|
int |
size()
This method has to return the number of stored data points. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BallTree(DistanceMeasure distance)
| Method Detail |
|---|
public void add(double[] values,
T storeValue)
GeometricDataCollection
add in interface GeometricDataCollection<T extends java.io.Serializable>values - specifies the geometric coordinates in data spacestoreValue - specifies the value at the given point
public java.util.Collection<T> getNearestValues(int k,
double[] values)
GeometricDataCollection
getNearestValues in interface GeometricDataCollection<T extends java.io.Serializable>k - the number of neighboursvalues - the coordinate of the querry point in the sample dimension
public java.util.Collection<Tupel<java.lang.Double,T>> getNearestValueDistances(int k,
double[] values)
GeometricDataCollection
getNearestValueDistances in interface GeometricDataCollection<T extends java.io.Serializable>k - the number of neighboursvalues - the coordinate of the querry point in the sample dimensionpublic SimpleDataTable getVisualization()
public java.util.Collection<Tupel<java.lang.Double,T>> getNearestValueDistances(double withinDistance,
double[] values)
GeometricDataCollection
getNearestValueDistances in interface GeometricDataCollection<T extends java.io.Serializable>values - the coordinate of the querry point in the sample dimension
public java.util.Collection<Tupel<java.lang.Double,T>> getNearestValueDistances(double withinDistance,
int butAtLeastK,
double[] values)
GeometricDataCollection
getNearestValueDistances in interface GeometricDataCollection<T extends java.io.Serializable>values - the coordinate of the querry point in the sample dimensionpublic int size()
GeometricDataCollection
size in interface GeometricDataCollection<T extends java.io.Serializable>public T get(int index)
GeometricDataCollection
get in interface GeometricDataCollection<T extends java.io.Serializable>public java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T extends java.io.Serializable>
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||