[FEA] pairwise distance primitives to output compressed format from scipy
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 1k
- Forks
- 251
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 31
Description
Scipy’s pdist() [1] function outputs a compressed form of pairwise distances that, for valid metrics, eliminates the symmetry and redundant self-loop distances.
The compressed output array is a deterministic size with deterministic indexing so it should be straightforward to implement this right in raft’s pairwise distances.
For now, we can use the current pairwise distance outputs (called the squareform format) for pdist in cupy and convert to the compressed form. It’ll use extra memory temporarily, though, so once the primitive is able to output this directly then we can update cupy to use it.
cc @teju85 @mdoijade
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing RAFT pairwise-distance primitive and compare its squareform output with scipy.spatial.distance.pdist indexing and size. Review how CuPy currently converts the output, then make the primitive produce the deterministic compressed representation directly and verify that the resulting distances and indexing match pdist.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100