How does BERTopic work?
mediumAnswer
- (1) Embed documents with sentence-transformers.
- (2) Reduce dimensionality with UMAP.
- (3) Cluster with HDBSCAN.
- (4) Extract topic keywords via class-based TF-IDF (c-TF-IDF): TF-IDF where each 'document' is the concatenation of cluster texts.
- Interpretable, handles short noisy text, supports topic modeling over time and hierarchical topics.
- Modern default for exploratory topic modeling on real-world corpora.
Check yourself — multiple choice
- Random
- Sentence embed → UMAP → HDBSCAN → c-TF-IDF keywords; interpretable + handles short noisy text; supports temporal + hierarchical topic modeling
- Same as LDA
- Not real
BERTopic: embed + UMAP + HDBSCAN + c-TF-IDF; short-text default.
#nlp#text#clustering
Practise Unsupervised Learning
214 interview questions in this topic.
Related questions
- LDA vs NMF for topic modeling — which do you pick?
- LDA or embedding-based topic modelling for a corpus of support tickets?
- What is topic modeling and when do you use LDA?
- How do you evaluate topic quality?
- LSA (Latent Semantic Analysis) — how does it relate to modern retrieval?
- TF-IDF weighting — formula and rationale.