Can I remove a given topic from my model?
Hi, I was just wondering if I am able to delete a specific topic from my model, or would I have to reduce it using the existing methods. Thanks
It is currently not directly possible to remove a specific topic entirely from the model. You could try to merge it with other topics that are not of interest or indeed use reduction techniques.
In the upcoming v0.12 release of BERTopic, you can use .update_topics to assign specific topics to the -1 class so that it will be ignored in most visualizations. However, it would technically not be deleted.
Out of curiosity, what would be the use case for deleting a topic rather than not showing it?
If I'm not mistaken, merging the topic with -1 would "delete" it in a sense, but the ordering of your topics would change too.
topic_model.merge_topics(docs, topics, [-1, topic_to_delete])
Due to inactivity, I'll be closing this for now. Let me know if you have any other questions related to this and I'll make sure to re-open the issue!