Python Forum

Full Version: Help with knn
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
These are my k values and their corresponding accuracy_score.
k = 3 --> 95.2127659574468
k = 4 --> 96.27659574468085
k = 5 --> 95.74468085106383
k = 6 --> 96.27659574468085
k = 7 --> 96.80851063829788
k = 8 --> 96.27659574468085
k = 9 --> 95.74468085106383
k = 10 --> 96.27659574468085
k = 11 --> 96.80851063829788

Which one is the best k value?
The higher the better. However, the answer on the question depends on how these values were computed. Did you use test sample? Is your classification problem well balanced or not? Since the results of computations include the same values of accuracy score for different k, I suspect that there are too few / insufficient data points in your test set...