Random k nearest neighbor
no vote
Application background K nearest neighbor (K-Nearest-Neighbor, KNN) is one of the simplest algorithms in data mining, which is used for target classification.. The basic principle is "jinzhuzhechi, howl". For example, some animal in a primitive forest (such as 1000), elephants, tigers, lions, dogs, lynx etc.. If you know the location of each animal (y, x). If someone tells you in the (a, b) is one of the animals, according to the KNN algorithm, you first find out from (a, b) recent five animals (k = 5) and find out the five animals most is what kind of animal, it can be predicted that (a, b) animals also belong to this kind of animal. Remember, you want to deposit the location and type of the animal in a file, format:10,34, tiger10,38, tiger109,35, lion104,40, lynx......Manual input 1000 animal is not a good idea, suggestion another program randomly generates several animals in an area and noted that usually is a social animal, if randomly assigned 1000 animals, KNN