Introduction - If you have any usage issues, please Google them yourself
K nearest neighbor density estimation is a classification method, not a clustering method.
It is not the best method, but it is popular in practice.
Popular but not necessarily understandable rule is:
1. calculate the distance between the data to be classified and the data in each other (Euclidean or Markov).
2. select the minimum distance from the previous K data, where the choice sorting method is used.
3. compare the previous K distances to find out which K data contains the most data of that class, that is, the class to which the data to be classified is located.