Questions tagged [pyldavis]

Python library for interactive topic model visualization. Port of the R LDAvis package.

pyLDAvis is designed to help users interpret the topics in a topic model that has been fit to a corpus of text data. The package extracts information from a fitted LDA topic model to inform an interactive web-based visualization.

The visualization is intended to be used within an IPython notebook but can also be saved to a stand-alone HTML file for easy sharing.

References: pyLDAvis- Wiki pyLDAvis- readthedocs PyPI

44 questions
1
vote
2 answers

Extract Word Saliency from Gensim LDA or pyLDAvis

I see that pyLDAvis visualize each word's saliency under each topic. But do we have a way to extract each word's saliency under each topic? Or how to calculate each word's saliency directly using Gensim LDA? So finally, I want to get a pandas…
Joesf.Albert
  • 149
  • 4
1
vote
1 answer

How do I correctly display pyLDAvis on Spyder or on a webpage?

I'm trying to create an interactive pyLDAvis visualization for an LDA model I have built, and although I am able to create a static visualization, I am struggling with the following: Outputting a dynamic visual that interacts with the 'relevance…
1
vote
0 answers

PyLDAvis Error : index 11588 is out of bounds for axis 1 with size 11588

I am trying to visualize the result of a topic model (built using gensim LDA model) with PyLDAvis using this tutorial but I keep getting this famous error index 11588 is out of bounds for axis 1 with size 11588 I tried to search all over…
Amine Ch 99
  • 145
  • 3
  • 14
1
vote
2 answers

Installed updated pyLDAvis but module missing 'pyLDAvis.gensim_models'

I found different links that answers this problem but it does not work No module named pyLDAvis what seems to be the problem? from pip freeze: pyLDAvis==3.3.1 from code: import pyLDAvis import pyLDAvis.gensim_models as gensim_vis error: File…
Led
  • 662
  • 1
  • 19
  • 41
1
vote
0 answers

Vega-lite to Altair - Sorting a chart based on the dynamically updated axis

I'm trying to recreate the pyLDAvis chart in Altair. I have a VL spec with a lot of transforms in it and I'm having trouble converting that to Altair. All credit goes here and here for helping me to get this far. I think I'm getting close but I get…
campo
  • 624
  • 5
  • 15
1
vote
1 answer

What does the PC1 and PC2 stands for in LDAvis?

I am new to LDA modelling and have managed to plot topics for some documents in LDAvis but noticed there is PCA 1 and PCA 2 on the axis of the plot, what are they and how can I find out what they are in my documents?
rowann
  • 29
  • 3
1
vote
0 answers

pyLDAvis: validation error when visualize topic

I tried generating topics using gensim for 20000 records. On trying to visualize the topics, I get a validation error. I can print the topics after model training, but not using pyLDAvis. corpus =…
SylviaM
  • 11
  • 1
1
vote
1 answer

Can LDAvis analyse the results of vowpal_wabbit LDA?

LDAvis provides a excellent way of visualsing and exploring topic models. LDAvis requires 5 parameters: phi (matrix with dimensions number of terms times number of topics) theta (matrix with dimensions number of documents times number of…
Hans Ekbrand
  • 405
  • 5
  • 13
1
vote
0 answers

Output pyLDAvis topic keywords with chosen lambda

I used PyLDAvis visualize LDiA model outputs and by playing around lambda I found key word chosen for each topic can be very interpretable under certain lambda value than others. I wonder if there is a easy way to output key words under certain…
MeiNan Zhu
  • 1,021
  • 1
  • 9
  • 18
1
vote
2 answers

How to get topic of new document in LDA model

How to pass a .txt document given by user dynamically in LDA model? I have tried the below code, but it's not working to give proper topic of the doc. The topic of my .txt is related to Sports so it should give the topic name as Sports. It's is…
0
votes
1 answer

'BrokenProcessPool: A task has failed to un-serialize.' error when running pyLDAvis.gensim

I'm trying to visualize the results of lda using pyLDAvis.gensim. However, I encountered an error while running the pyLDAvis.gensim package. When I execute the code, I receive the 'BrokenProcessPool: A task has failed to un-serialize.' error…
0
votes
0 answers

Trying to visualize topics using pyldavis but it is giving drop error. How to slove

TypeError Traceback (most recent call last) Cell In[301], line 4 2 pyLDAvis.enable_notebook() 3 # lda_model = LdaMulticore(corpus=list(df_proc['vec']), id2word=dictionary, iterations=50, num_topics=12,…
harivilas
  • 11
  • 2
0
votes
0 answers

CountVectorizer Error using pyLDAvis. Any thoughts on how to resolve?

I am trying to get this snippet of code working. vectorizer = CountVectorizer(analyzer='word', min_df=3, # minimum reqd occurences of a word …
ASH
  • 20,759
  • 19
  • 87
  • 200
0
votes
2 answers

visualizing LDA model using pyLDAvis

I'm running jupyter notebook in vscode. I have build my LDA model using gensim but when I want to visualize it, it shows nothing. my code is: import pyLDAvis import pyLDAvis.gensim_models pyLDAvis.enable_notebook(local=True) vis =…
Mhmmd
  • 3
  • 1
0
votes
0 answers

pyLDAvis.prepare function term_frequency calculation

I am trying to visualize LDA model with pyLDAvis. This was working for me: pyLDAvis.gensim.prepare(lda_model, corpus, id2word) but now it is throwing an error: AttributeError: module 'pyLDAvis' has no attribute 'gensim' I tried…