Interactive K-Nearest Neighbors

Interactive K-Nearest Neighbors#

This tool lets you explore how the K-Nearest Neighbors (KNN) algorithm works by finding the k closest points to a target node.

✅ How to Use:

  • Adjust the k slider to change the number of nearest neighbors (1-15).

  • Observe how changing k affects which points are considered “neighbors”

  • View statistics including individual distances and the average distance to all k neighbors