ddangelov / Top2Vec

Top2Vec learns jointly embedded topic, document and word vectors.
BSD 3-Clause "New" or "Revised" License
2.95k stars 374 forks source link

How to reduce the number of topcis #330

Open yananma1029 opened 1 year ago

yananma1029 commented 1 year ago

Hi I'd like to know how to reduce the number of topics. Is there any function in top2vec that I can use?

Vela-zz commented 1 year ago

if you say reduce topics in trainng step, you need to adjust hyperparameter of UMAP and HDBSCAN used in Top2Vec Model I think,

if you want to merge topics in a trained model, just use hierarchical_topic_reduction function, it will find topic with smallest size and merge it with its nearst topic untill to the number of topics you want.