Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic Numbers/Labels in LDAvis #266

Closed
fishdontfly opened this issue Jun 4, 2018 · 2 comments
Closed

Topic Numbers/Labels in LDAvis #266

fishdontfly opened this issue Jun 4, 2018 · 2 comments

Comments

@fishdontfly
Copy link

Thank you for creating such a useful package!

I recently noticed that the topic numbers that result from lda_model$plot() differ from those that lda_model$get_top_words() produces.

For example, if I run lda_model$plot(n=5, lambda =0.6), the bubble for topic #1 actually aligns perfectly with topic #15 from lda_model$get_top_words(). I checked and the plot is not reordering topics, so I cannot figure out why this is happening.

Ideally I'd like to produce a list of the top terms for each topic using lda_model$get_top_words(), and also use the LDAvis plot from lda_model$plot() to explore them even further, but this is difficult to do without the topic numbers matching.

@dselivanov
Copy link
Owner

Hi @fishdontfly. This is due to the fact that LDAvis CRAN version is dated 2015. Please install latest from github (devtools::install_github("cpsievert/LDAvis")) - after that it will work as you expect.

This is related to #233 - once it will be rewritten in text2vec we won't be depend on unreleased version of LDAvis.

@dselivanov dselivanov changed the title Topic Numers/Labels Topic Numers/Labels in LDAvis Jun 5, 2018
@fishdontfly
Copy link
Author

fishdontfly commented Jun 5, 2018

Thank you @dselivanov, that did the trick and I appreciate your fast response! Fixes #266

@fishdontfly fishdontfly changed the title Topic Numers/Labels in LDAvis Topic Numbers/Labels in LDAvis Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants