Add different distance functions
Add k-nearest neighbour