NearestNeighbors with custom metrics