Modified validation section for kNN