I think we can avoid this computation (happening during landmark creation):
|
distances = cdist(data, data[landmark_indices], metric="euclidean") |
Since we compute the distances between every pair of points here:
|
distances, indices = knn_tree.kneighbors(Y, n_neighbors=search_knn) |