I'm trying to implement KNN classification with cross-validation implementation in python. The data consists of 10 folds of size 99x64, each with their corresponding label of size 99x1. Do I have to calculate distances row by row between each fold, for a resulting $99x1$ distance-vector for every $k-1$ testing fold? E.g. Let's say we have three folds, each of dimension $[99x64]$. Assuming we are testing on fold $1$ with folds 2, 3 being the validating datasets, I would end up with two distance-vectors of size $[99x1]$ since I'm calculating the distance between rows of each fold.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.