Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize pairwize distance using KDTree #116

Open
redhog opened this issue Oct 19, 2024 · 0 comments
Open

Optimize pairwize distance using KDTree #116

redhog opened this issue Oct 19, 2024 · 0 comments
Labels
efficiency Making docetl operations run faster

Comments

@redhog
Copy link
Collaborator

redhog commented Oct 19, 2024

Use https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.KDTree.html to not compute all distances, only ones that are shorter than the cutoff saught. https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise_distances.html computes all pairs, so this is a considerable space and time saving.

@redhog redhog added Optimization efficiency Making docetl operations run faster and removed Optimization labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
efficiency Making docetl operations run faster
Projects
None yet
Development

No branches or pull requests

1 participant