I am trying to implement a k-NN algorithm but it keeps resulting in very low accuracy values. There must be a logic error but I couldn\'t figure out where it is. The code is bel