*2.6. K-Nearest Neighbor*

One data mining technique is the K-nearest neighbor (KNN) approach used for categorization, which assigns a batch of data based on learning previously labeled or categorized data. The outcomes of newly categorized query instances based on the majority of the proximity to existing categories in KNN fall under the category of supervised learning, including KNN. The following are processes involved in categorizing using the K-nearest neighbor (KNN) algorithm: 1. Establishes the k parameter; 2. Determines the separation between training and test data using the Euclidean distance calculation; 3. Arranges the formed distances; 4. Establishes the distance closest to the sequence K; 5. Matches the

proper class; 6. Assigns the class as the data class to be assessed by counting the number of classes from the nearest neighbors [32].
