Skip to main content
K-Nearest Neighbors (KNN) makes predictions by finding the K training examples closest to the input and returning their most common class. No training phase is required — the model stores the training data and queries it at prediction time.

Configuration

Input / Output

When to use

Simple and effective for small datasets. Always scale features — KNN is purely distance-based and will give misleading results if features are on different scales. Slow at prediction time on large datasets.