1 link tagged with all of: embeddings + hdbscan + sentence-transformers + text-clustering
Click any tag below to further narrow down your results
Links
This guide shows how to turn raw documents into semantic embeddings using a pre-trained sentence-transformers model, reduce their dimensionality with UMAP, and then apply HDBSCAN to uncover topic clusters without labels. It walks through data loading, embedding generation, dimensionality reduction, clustering, and sampling of cluster contents in Python.
- Pulling 150 posts from three newsgroup categories and encoding them with all-MiniLM-L6-v2 gave 384-dim embeddings in seconds.
- UMAP compressed those vectors from 384 to 5 dimensions to make density-based clustering feasible.
- HDBSCAN (min cluster size 8, min_samples 3) found just two clusters (101 and 49 docs) with zero points labeled noise, though sci.space and sci.med content blurred together in one cluster while autos formed a distinct second group.
- Adjusting HDBSCAN's cluster size and sample thresholds would change the number of clusters detected, and plotting all pairwise UMAP dimensions offers a visual check on whether clusters match intuitive topics.