algorithm - how to actually get the nearest neighbor in weka using java -


so i've been trying use ibk nearest neighbor algorithm goes weka machine learning library.....

i know how classify instances, want implement collaborative filtering feature need list of actual objects nearest object of interest...

how in weka using java api?

how 1

weka.core.neighboursearch.linearnnsearch knn = new linearnnsearch(             traininginstances); //do other stuff  instances nearestinstances= knn.knearestneighbours(target, 3) 

here api documentation can refer to.


Comments