BERTopic icon indicating copy to clipboard operation
BERTopic copied to clipboard

No "Topic 0" on Topic Word Scores

Open gulyazici opened this issue 4 years ago • 5 comments

Hi, I run BERTopic modelling code several times and I never see Topic 0 on Topic Word Scores visualization chart. How can I solve this problem? Any idea why this is happening? topic word scores

gulyazici avatar Mar 13 '22 10:03 gulyazici

Good question, I am not entirely sure why this is happening, unfortunately. Which BERTopic version are you using? Also, what is the output if you run topic_model.get_topic_info()?

MaartenGr avatar Mar 14 '22 07:03 MaartenGr

Hi Maarten, I use google colab, i install BERTopic, it is "bertopic-0.9.4". For all topic infos and other visualization chart, there is no problem, I have Topic 0. But when it comes to bar charts, there is no Topic 0.

But I just found out this, if I do topic reduction, then I can see Topic 0. But I don't want to do reduction. Any comment?

Thanks,

gulyazici avatar Mar 14 '22 19:03 gulyazici

Just dug a little deeper in the code and there seems to be a bug with the top_n_topics in some of the visualizations. It happens quite rarely but as you have experienced it still happens. This can happen if the number of outliers is less than Topic 0, which is checked for in some visualizations but not all.

I expect to be working on a number of small bug fixes in the coming weeks, so expect this to be added there.

MaartenGr avatar Mar 15 '22 11:03 MaartenGr

Thank you so much! waiting for the fix.

gulyazici avatar Mar 19 '22 09:03 gulyazici

It seems this issue was fixed in v0.10.0, so I am going to close this for now. If you still run into this issue, let me know and I'll reopen the issue.

MaartenGr avatar Jun 29 '22 14:06 MaartenGr