Docstring issues in random_projection_split functions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.3k
- Forks
- 871
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 5
Description
Hi,
[angular_random_projection_split](https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L29-L53), [euclidean_random_projection_split](https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L132-L156), [sparse_angular_random_projection_split](https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L221-L250) and [sparse_euclidean_random_projection_split](https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L331-L360) all have the same docstring issue (the Returns section doesn't match what is returned by the function).
`hyperplane_offset` seems to always be a float. `hyperplane` (or `hyperplane_vector`) seems a bit harder to infer (it will likely be different for different functions).
#### angular_random_projection_split
https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L45-L53
https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L128
#### euclidean_random_projection_split
https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L148-L156
https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L217
#### sparse_angular_random_projection_split
https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L242-L250
https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L327
#### sparse_euclidean_random_projection_split
https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L352-L360
https://github.com/lmcinnes/umap/blob/d286224a86dfe730c76f082c6f523b69b57bd0f8/umap/rp_tree.py#L436
Contributor guide
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 in umap/rp_tree.py by reading the Returns sections and return statements of angular_random_projection_split, euclidean_random_projection_split, sparse_angular_random_projection_split, and sparse_euclidean_random_projection_split. Update each docstring so its documented values and types match what the function returns, including hyperplane_offset and hyperplane or hyperplane_vector. Done means all four Returns sections accurately describe their outputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100