Back to Home

K-Nearest Neighbors Pro

Advanced KNN classifier with multiple distance metrics, interactive visualization, and comprehensive feature analysis

Configuration

Test Point

Must be between 1 and 9

Add Training Point

Results

Prediction

B

Confidence: 66.7%

3 Nearest Neighbors

#1: Label "A"

Point: (4.00, 5.00)

1.4142

distance

#2: Label "B"

Point: (6.00, 8.00)

2.2361

distance

#3: Label "B"

Point: (7.00, 8.00)

2.8284

distance

Vote Distribution

"A"
1/3
"B"
2/3

Training Data (9 points)

3 unique classes
#XYLabelAction
12.003.00A
23.003.00A
34.005.00A
46.008.00B
57.008.00B
68.009.00B
71.002.00C
82.001.00C
91.001.00C

💡 Quick Tips

  • • Adjust K to see how it affects the prediction
  • • Try different distance metrics to understand their behavior
  • • Add more training points to improve classification accuracy
  • • K should typically be odd for binary classification to avoid ties
  • • Larger K values make the decision boundary smoother