# How to find the best clustering method?

I have a data set where the samples are people and the feature are their age, sex, location, job, height, weight… Then I will have a new person with the same information and my goal is the find the twenty closest persons from him/her.

I think a clustering algorithm on Python could do the job. But there is a lot of different clustering algorithms and I don’t know which one will fit my problem the best.

KMeans seems to be the easiest clustering method but I don’t know the number of clusters. Same problem with Ward hierarchical clustering.

Mean shift seems more advanced and complicated, I haven’t found a lot of documentation on it. Then my data set is about $100 000$ samples and the maximum recommended is $10 000$ for MeanShift but I could easily separate the data set per area to reduce its size.

Do you think a clustering method is a good idea ? Which one should be the best for my problem ?

• You don't need a library for a simple k-NN classifier. You can implement it in less than 8 lines of code. The core of a k-NN is distance function. I recommend to use something simple like a Manhatten distance function: $/sum_{i=0}^n |x_{i} - y_{i}|$ – Unhandled exception Jul 9 '16 at 10:39