Optimal value of 'k' in knn algorithm

how optimal value of ‘k’ in knn algo can be decided through cross validation.

Just randomly choose values for k, say 5, 7, 10 etc, and calculate the accuracy. The value of k for which the accuracy is maximum is the optimal value of k.

Happy Learning :slight_smile:
Thanks.