lda

Iterate function across dataframe

Iterate function across dataframe Question: I have a dataset containing pre-processed online reviews, each row contains words from online review. I am doing a Latent Dirichlet Allocation process to extract topics from the entire dataframe. Now, I want to assign topics to each row of data based on an LDA function called get_document_topics. I found …

Total answers: 2

Topic modeling on short texts Python

Topic modeling on short texts Python Question: I want to do topic modeling on short texts. I did some research on LDA and found that it doesn’t go well with short texts. What methods would be better and do they have Python implementations? Asked By: Sri Test || Source Answers: You can try Short Text …

Total answers: 4

A practical example of GSDMM in python?

A practical example of GSDMM in python? Question: I want to use GSDMM to assign topics to some tweets in my data set. The only examples I found (1 and 2) are not detailed enough. I was wondering if you know of a source (or care enough to make a small example) that shows how …

Total answers: 4

Python Gensim: how to calculate document similarity using the LDA model?

Python Gensim: how to calculate document similarity using the LDA model? Question: I’ve got a trained LDA model and I want to calculate the similarity score between two documents from the corpus I trained my model on. After studying all the Gensim tutorials and functions, I still can’t get my head around it. Can somebody …

Total answers: 3

Understanding LDA implementation using gensim

Understanding LDA implementation using gensim Question: I am trying to understand how gensim package in Python implements Latent Dirichlet Allocation. I am doing the following: Define the dataset documents = [“Apple is releasing a new product”, “Amazon sells many things”, “Microsoft announces Nokia acquisition”] After removing stopwords, I create the dictionary and the corpus: texts …

Total answers: 5