Package weka.core.neighboursearch
Interface NearestNeighbourSearchWithIndices
-
- All Known Implementing Classes:
FilteredSearchWithIndices
,NewNNSearchWithIndices
,PCANNSearchWithIndices
,PLSNNSearchWithIndices
public interface NearestNeighbourSearchWithIndices
Interface for neighborhood search algorithms that can return the indices of the neighbors.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int[]
kNearestNeighboursIndices(weka.core.Instance target, int kNN)
Returns the indices of the k nearest instances in the current neighbourhood to the supplied instance.
-
-
-
Method Detail
-
kNearestNeighboursIndices
int[] kNearestNeighboursIndices(weka.core.Instance target, int kNN) throws Exception
Returns the indices of the k nearest instances in the current neighbourhood to the supplied instance.- Parameters:
target
- The instance to find the k nearest neighbours for.kNN
- The number of nearest neighbours to find.- Returns:
- the indices of the k nearest neighbors in the dataset
- Throws:
Exception
- if the neighbours could not be found.
-
-