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

PyLDAvis doesn't display anything #2

Closed
hisen630 opened this issue Feb 18, 2018 · 4 comments
Closed

PyLDAvis doesn't display anything #2

hisen630 opened this issue Feb 18, 2018 · 4 comments

Comments

@hisen630
Copy link

hisen630 commented Feb 18, 2018

hi, great book.
however, i followed all your instructions in chapter 7, the code pyLDAvis.sklearn.prepare(pos_nmf, ptvf_features, ptvf, R=15) displays nothing in my notebook. And i found this warning from jupyter console:

RuntimeWarning: invalid value encountered in multiply
  relevance = lambda_ * log_ttd + (1 - lambda_) * log_lift

i don't know if there's anything i can do to get the pic.
thanks


this should be a bug comes from pyLDAvis, following codes could work:

data = pyLDAvis.sklearn.prepare(pos_nmf, ptvf_features, ptvf, R=15)
pyLDAvis.show(data)
@raghavbali
Copy link
Collaborator

Hey @hisen630 ,

Thanks for the feedback. Glad you found the book useful, do share your feedback on amazon (it really encourages and would be highly appreciated).

Apologies for delayed response, we have been busy with some other projects.
Could you share python version /Anaconda installation details along with your import statements. We can take it from there.

In case you found the fix, do post how you handled it for the benefit of others.

Cheers.

@dipanjanS
Copy link
Owner

dipanjanS commented Mar 28, 2018

Did you also execute pyLDAvis.enable_notebook() before running the other piece of code?

Please refer to http://nbviewer.jupyter.org/github/bmabey/hacker_news_topic_modelling/blob/master/HN%20Topic%20Model%20Talk.ipynb for a demo by the author of the package. If you use the enable_notebook() function then you don't need to use the show function explicitely. Do let us know if this worked or you still needed to use the show function and then we can check out if something changed in the library recently.

@dipanjanS
Copy link
Owner

dipanjanS commented May 22, 2018

Closing this due to lack of further activity (> 1 month). Feel free to reach out in the future as needed or open a new issue in case of further problems.

@sachindevsharma
Copy link

trying with pyLDAvis.enable_notebook(local=True) worked for me

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

4 participants