org.neuroph.nnet.learning.knn
Class KNearestNeighbour
- java.lang.Object
-
- org.neuroph.nnet.learning.knn.KNearestNeighbour
-
public class KNearestNeighbour extends java.lang.Objectfor given vector calculate distances to all vectors from list and finds minimum vector or sort vectors by distance and seelct
-
-
Constructor Summary
Constructors Constructor and Description KNearestNeighbour()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.List<KVector>getDataSet()KVector[]getKNearestNeighbours(KVector vector, int k)http://en.wikipedia.org/wiki/Selection_algorithmvoidsetDataSet(java.util.List<KVector> dataSet)
-
-
-
Method Detail
-
getKNearestNeighbours
public KVector[] getKNearestNeighbours(KVector vector, int k)
http://en.wikipedia.org/wiki/Selection_algorithm- Parameters:
vector-k-- Returns:
-
getDataSet
public java.util.List<KVector> getDataSet()
-
setDataSet
public void setDataSet(java.util.List<KVector> dataSet)
-
-
DMelt 3.0 © DataMelt by jWork.ORG