lincc-frameworks / lincc-frameworks/hyrax
How Shall Hyrax Handle Users Who Want to Do Clustering
@aritraghsh09 is already working on this.
Since Jan 27, 2026.
- Dominant language
- Python
- Stars
- 41
- Forks
- 7
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 8
Description
I am opening this PR to discuss how we should support clustering in Hyrax. Currently, here's my poorman's code for doing clustering:-
I have uploaded two notebooks; one for clustering in the UMAP dimensions and another for clustering in the pre-UMAP model output dimensions (but still visualizing on the UMAP)
You will see my implementation is very basic. I use `extract_umap_info` to automatically read where the Inference and/or UMAP data is stored. Then the plotting function `plot_highdim_clusters_on_umap`/`plot_umap_clusters` does the magic of the actual clustering and plotting, using the `apply_clustering` function, where it's calling a bunch of functions like `apply_hdbscan_clustering` to support the actual clustering (all via `sklearn`)
This approach currently doesn't interact with the main Hyrax framework and can be given to users as examples of how to do do it once they have their runs.
Maybe the 0th thing is to pull these two notebooks in as examples in our docs. But reading all of this code again, this is meaty enough that down the line it could become a verb.
[clustering (2).ipynb](https://github.com/user-attachments/files/24893044/clustering.2.ipynb)
[clustering_highdim (1).ipynb](https://github.com/user-attachments/files/24893045/clustering_highdim.1.ipynb)
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.
Assessment
This issue has not been assessed yet.