/KNN-algo

Java implementation of KNN Algorithm

Primary LanguageJavaApache License 2.0Apache-2.0

KNN-algo

K-nearest neighbors algorithm in java that supports the cosine and euclidean distance functions.

How to run

  1. Run rebuild.sh script file which will create KNN.jar.
  2. Run rerun.sh script file with following paramters java -cp knn.jar cs286.Knn <hold-out %> <k> <distance> <input> <output> it uses iris-data set as an input.