remove NearestNeighbors dependency.