Why is KNN slow with custom metric?
问题 I work with data set consists about 200k objects. Every object has 4 features. I classifies them by K nearest neighbors (KNN) with euclidean metric. Process is finished during about 20 seconds. Lately I've got a reason to use custom metric. Probably it will make better results. I've implemented custom metric and KNN has become to work more than one hour. I didn't wait for finishing of it. I assumed that a reason of this issue is my metric. I replace my code by return 1 . KNN still worked more