Incognition logo
Home
Learn
Practice
Leaderboard
0
VisualizationsClassical Machine Learning

Hyperparameter Tuning

Switch a KNN model between k = 1, 7 and 15 neighbors. The shaded regions and the train and test accuracy show how much that one setting matters.

Same Algorithm, Wildly Different Results

One KNN model, three values of k. Nothing else changes.

Train Accuracy
100%
Test Accuracy
88%

k=1 always scores 100% on training data — its nearest neighbor is itself.

Customize