kNN from Scratch