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
0
votes
0 answers

Why is the term frequency displayed in my pyldavis visualization changing?

I am currently building an LDA model using bigrams as tokens. I have a basic cleaning function that removes stopwords, lowercases, removes punctuation, and a function to take the tokenized column of documents and converts them to bigrams. I am…
0
votes
0 answers

Meaning of "tokens" in pyLDAvis

I created an LDA visualization using pyLDAvis and was wondering what "token" means in the title of the bar graph (i.e., Topic 3 (14% of tokens)). I read the pyLDAvis documentation, but could not find an explanation. Does this mean that 14% of all…
ac12
  • 1
0
votes
1 answer

how could I solve "a result has failed to un-serialize. please ensure that the objects returned by the function are always picklable." when I run LDA?

When I use the pyLDAvis.gensim functoion to construct visualization at google colab, it shows this error: a result has failed to un-serialize. please ensure that the objects returned by the function are always picklable. My codes are: !pip install…
Eric KY
  • 1
  • 3
0
votes
1 answer

Count the number of tokens in a Documenttermmatrix

I have a question to a Documenttermmatrix. I would like to use the "LDAVIS" package in R. To visualize my results of the LDA algorithm I need to calculate the number of tokens of every document. I don´t have the text corpus for the considered DTM.…
Sylababa
  • 65
  • 4
0
votes
0 answers

pyldavis AttributeError: 'DataFrame' object has no attribute 'ix'

Im getting this error when I try to run vis = pyLDAvis.gensim.prepare(lda_model, corpus, dictionary=lda_model.id2word) vis. 385 # reorder all data based on new ordering of topics 386 topic_freq = topic_freq[topic_order] --> 387 …
0
votes
1 answer

Error while dividing two columns value in a dataframe

I am receiving an error while dividing two columns value in a dataframe. This is the code: df['lose%'] = df['LostGames']/ df['PlayedGames'] This is my error: TypeError: unsupported operand type(s) for /: 'str' and 'str' Can anyone help me with…
0
votes
1 answer

TypeError: an integer is required (got type str) LDAvis

I am new to Python and Data Science in general. I am trying to work on some LDA visualizations, but for some reason I keep getting the following error. Any help would be greatly appreciated! Type Error: an integer is required (got type str) import…
Sofia O
  • 23
  • 4
0
votes
2 answers

Why pyLDAvis graph does not display topic keywords on the bar chart?

I am trying to visualise results of an LDA Model using PyLDAvis. I have managed to get the graphs to display in jupyter notebook, however, the labels of the keywords describing the topics (on the bar chart) are missing. Below is an example of the…
0
votes
0 answers

Viewing saved LDAvis plot from directory in browser

I created an LDAvis figure using the text2veec package in R. Tried but failed to save it to my local directory as the fully interactive webpage that it is. I get either a blank page in my browser or a static when save thee figure with the following…
nigus21
  • 337
  • 2
  • 11
0
votes
2 answers

Installing python packages on anaconda on macos

This may be a silly simple question, but I couldn't find an answer in the documentation of Anaconda or elsewhere. I am a bit of a noob when it comes to Python and I am trying to install a package. The problem is generalizable to other…
sumusa
  • 1
  • 1
  • 3
0
votes
2 answers

Python extracting contents from list

I am putting together a text analysis script in Python using pyLDAvis, and I am trying to clean up one of the outputs into something cleaner and easier to read. The function to return the top 5 important words for 4 topics is a list that looks…
ARH
  • 127
  • 6
0
votes
0 answers

A Plot like PyLDAVis for Visualizing Common Words between Columns

I have a dataset where I have multiple text-type columns (150+), and I want to be able to visualize the common words between all of them, as well as their own separate words. I tried using venn-diagram plots by matplotlib but they're restricted to 3…
0
votes
1 answer

pyLDAvis arguments for specifying principal components

Need assistance regarding the Principal components to be displayed in pyLDAvis. It shows PC1 and PC2 by default, however I am interested in exploring other components as well. I referred this documentation but the specified option plot_opts={'xlab':…
0
votes
1 answer

Common words that cause topic overlap in gensim LDA

When we visualize the LDA using pyLDAvis, we can see topic overlap. I want know the word that is causing this topic overlap. Or I want to know the words that are at the intersection of the topic bubbles. Any guidance is appreciated.
Sid
  • 552
  • 6
  • 21
1 2
3