Skip to content

farnazgh/K-nearest-neighbor

Repository files navigation

K-nearest-neighbor

Dataset: wine, https://archive.ics.uci.edu/ml/machine-learning-databases/wine/

k = 1, 2, 3

30 iterations and in each iteration we randomly choose train data(80%) and Test data(20%)

Methods for calculating the distance between two samples: Euclidean distance - Cosine distance

knnsearch_k1.m , knnsearch_k2.m , knnsearch_k3.m -> K-nearest-neighbor by using knnsearch library