Introduction - If you have any usage issues, please Google them yourself
steps:
In order to determine the unknown instance categories, with examples of all known categories as reference
Parameter selection of K
The calculation examples and all known examples of the unknown distance
Choose the closest known instance K
According to the majority voting rule (majority-voting), for example the unknown classified as K most adjacent to the majority in the sample category