gregversteeg / corex_topic

Hierarchical unsupervised and semi-supervised topic models for sparse count data with CorEx
Apache License 2.0
627 stars 120 forks source link

2 Visualization Issues #53

Open adesronvil opened 2 years ago

adesronvil commented 2 years ago

Hello,

I'm having trouble with two visualization issues in corex_topic, both from the provided examples.

The first comes from the README.md file in the below code which returns the error "IndexError: tuple index out of range". All of the code in the README.md file above these lines of code work just fine. Can you advise on how to fix?

from corextopic import vis_topic as vt
vt.vis_rep(topic_model, column_label=words, prefix='topic-model-example')

The second issue comes from viz_hierarchy in the corex_topic_example.ipynb file that is provided. This returns a folder with two files: "groups.txt" and "topics.txt". "groups.txt" is populated but "topics.txt" is not. Do I have to create the DiGraph manually after this step? I do not see it in the folder and I cannot get it to print in the Jupyter Notebook.

vt.vis_hierarchy([topic_model, tm_layer2, tm_layer3], column_label=words, max_edges=200, prefix='topic-model-example')

I've checked the open and closed issues and noticed similar issues to these but have not yet seen solutions. Thanks in advance for any help.