Where do the topic names come from?
Join the posts of each HDBSCAN cluster (−1 too), replace line breaks and tabs by spaces, count with a stop-word list, apply the class-based TF-IDF (c-TF-IDF). Predict: what will the outliers be named after?
| cluster | posts | top words, by hand |
|---|---|---|
| −1 | 431 | space jpeg launch image |
| 1 | 567 | god jesus people church |
| 0 | 520 | team game hockey play |
| 15 | 66 | image graphics package processing |
| 9 | 55 | card mode vesa vga |
| 23 | 52 | moon lunar prize money |
Predict. Topic 2 (image processing) with BERTopic's default vectorizer, which has no stop-word list: what will its top words look like?
| topic 2, named by… | top words |
|---|---|
| default vectorizer | image and for of to it or the graphics with |
| stop words removed | image graphics package processing software data analysis … |
| KeyBERTInspired | graphical graphics rtrace plots tools interactive plotting … |
KeyBERTInspired re-ranks the candidate words by the cosine between each word's embedding and the topic's typical documents. update_topics changes the words; the assignments stay identical.get_topic(t) top words and scores · get_representative_docs(t) typical documents
find_topics("rocket engines") by meaning · transform(new_docs) new documents, no refit
visualize_topics(), visualize_barchart(), visualize_documents(): interactive Plotly charts
reduce_topics, reduce_outliers: the advanced part of E3.4 measures what they cost
MaximalMarginalRelevance(diversity=0.5) against KeyBERTInspired.find_topics.In the lab: steps 8 to 10. Next: the advanced slides of E3.4.