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

Compute pairwise distances #277

Closed
lochhh opened this issue Aug 23, 2024 · 1 comment · Fixed by #278
Closed

Compute pairwise distances #277

lochhh opened this issue Aug 23, 2024 · 1 comment · Fixed by #278
Assignees
Labels
enhancement New optional feature

Comments

@lochhh
Copy link
Collaborator

lochhh commented Aug 23, 2024

A few metrics to consider

  • distances between 2 keypoints (within each individual, e.g. dist_snout_rightear for each individual)
  • distances between 2 individuals (across all pairs of the same keypoints, e.g. dist_individual1_individual2 contains snout-to-snout, rightear-to-rightear, tail-to-tail, etc. distances between individual1 and individual2)
  • distances between different keypoints of different individuals (dist_individual1snout_individual2rear contains the distances between individual1's snout and individual2's rear)

See also

  • SciPy's pdist, which returns a condensed distance matrix, and cdist
  • relevant SO question on achieving pdist in xarray
  • Matlab's pdist2
@lochhh lochhh added the enhancement New optional feature label Aug 23, 2024
@lochhh lochhh mentioned this issue Aug 23, 2024
13 tasks
@lochhh lochhh self-assigned this Aug 23, 2024
@sfmig
Copy link
Contributor

sfmig commented Aug 27, 2024

Matlab also has pdist2 - the syntax is quite intuitive imo.

Maybe worth a look 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New optional feature
Projects
Development

Successfully merging a pull request may close this issue.

2 participants