BERTopic
BERTopic copied to clipboard
topic_model.visualize_topics() get d1 d2 coordinates
is there a way to get the coordinates of d1 and d2 explicitly? i've written a hack to get out the d1 d2 dimensions, but it doesn't always work (e.g. not all coordinates are given sometimes, e.g. 0_topic is sometimes missing)
fig_dict = fig.to_dict() d1_x = fig_dict['data'][0]['x'] d2_y = fig_dict['data'][0]['y']
I believe that the coordinates should work if you install BERTopic from the main branch. The missing topic 0 is due to an issue that is fixed within that branch and simply upgrading it to the latest commit should solve that issue.
ah ok. i'm just running pip install. i'll review