Simple knn classifier with kd-tree