MLAI/Classification
K-Nearest Neighbors (KNN)
데먕
2020. 1. 20. 20:49
1. Overview
K nearest neighbors is a simple algorithm that stores all available cases and classifies new cases based on a similarity measure (e.g., distance functions)
2. Description
2.1 Procedure
- Step 1: Choose the number K of neighbors
- Step 2: Take the K nearest neighbors of the new data point, according to the Euclidean distance
- Step 3: Among these K neighbors, count the number of data points in each category
- Step 4: Assign the new data point to the category where you counted the most neighbors
3. Reference
https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm
https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm