Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [latent-dirichlet-alloc]

Latent Dirichlet Allocation (LDA) is an unsupervised, statistical approach to document modeling that discovers latent semantic topics in large collections of text.

0
votes
0answers
14 views

Custom topic priors in LDA

I've been working with LDA (Latent Dirichlet Allocation topic model) for a while now and I believe I have an intermediate understanding of it. The unsupervised nature of LDA is one of its big ...
0
votes
1answer
14 views

gensim LdaModel - How to reduce the number of words in each topic?

I'm trying to get more sparse topics (Less overlaps between different topics). https://radimrehurek.com/gensim/models/ldamodel.html I know it should be determined by the alpha parameter. I've ...
0
votes
0answers
12 views

LDA: weight distributions of inferred documents

I have trained a two-topic Latent Dirichlet Allocation (LDA) model on a corpus and I am now inferring on a test corpus (the nature of the corpus is irrelevant). During inference, for each new document ...
0
votes
0answers
5 views

how to perform statistical analysis on topics produced by topic models?

I have a large corpus of over 1.2 million text documents. After applying LDA to a small sample of the corpus, I have determined the number of topics be 34 using topic coherence score. Here, some ...
0
votes
1answer
22 views

using latent dirichlet allocation to reduce the number of dimensions in bag of words model?

Does anyone have experience reducing the dimensions in a traditional bag of words model? For example, if you want to train a decision tree on a large set of reviews, the size of the vocabulary ...
1
vote
1answer
19 views

Prerequisites for Latent Dirichlet Allocation

I have read several "intuitive" introductions to LDA. However, I now want to learn it properly. I have already read through most of Duda, and that was my introduction to data science. However, I ...
0
votes
1answer
31 views

LDA detect new emerging topics

Thanks for stopping by. I have a directional question - I've built a Latent Dirichlet Allocation using Gensims Mallet wrapper. I trained the model once on OldDataSet.csv and measured coherence. I have ...
0
votes
1answer
69 views

What is the formula for c_v coherence?

I've recently been playing around with Gensim LDAModel. I use coherence to evaluate the results. Gensim offers a few coherence measures. This includes c_v and ...
1
vote
0answers
34 views

Choosing the number of topics in topic modeling with multiple “elbows” in the coherence plot

When plotting the number of topics on the x-axis and the coherence score on the y-axis, I had expected to see an "elbow" (for example, here and here). In this case, however, the plot does not have a ...
0
votes
0answers
32 views

Visualizing a Latent Dirichlet Allocation (LDA) by Multidimensional Scaling (MDS)

I did an LDA with four topics for four different Smartphones. This was done using customer Reviews of Amazon. ...
1
vote
0answers
15 views

How to interpret LDA (Latent Dirichlet Allocation)?

Say I want to run topic modeling with LDA on The 20 newsgroups text dataset. So basically a dataset with texts where every text belongs to one of 20 categories. I want the LDA to split the documents ...
1
vote
1answer
14 views

When DV is dichotomous and IV is ordinal, should I use LPA or LCA?

Suppose my dependent/outcome variable is composed of 6 vignettes that has dichotomous outcomes of "Yes" (1) or "No" (0). Normally, I can just get a sum-score total so that it's a score from 0 (...
1
vote
0answers
27 views

Why does perplexity change with different ranges of k?

I ran a 5-fold cross-validation in R to calculate LDA perplexity for k = 2:9 using a 10% sample of my data. The output was: ...
0
votes
0answers
11 views

Why do topics found by latent dirichlet allocation correlate negatively?

I am dealing with 14000 documents that I am trying to analyze with an LDA. Also I am trying to interpret the outcome. I notice negative correlations between the topic probabilities. I think I expected ...
0
votes
0answers
17 views

Combining the topics of two Latent Dirichlet Allocations

How to combine two LDAs? Let's suppose we have one corpus and we have estimated two Latent Dirichlet Allocations for two sub-corpuses : one for sub corpus A and another for sub corpus B. Now first ...
-1
votes
1answer
59 views

Question about the generative process in latent Dirichlet allocation (LDA)?

According to the wikipedia article about LDA https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation in the "Generative process" section: Isn't this a contradiction? As you know "~" symbol means "...
0
votes
1answer
269 views

LDA: find percentage / number of documents per topic

I'm using LDA to find topics in a corpus. Everything works fine (I have the topics). But I would like to have the percentage / number of documents in each topic. It's possible? I looked at scikit-...
1
vote
0answers
85 views

How do I compute LDA topic similarity?

I am using the tidytext, quanteda, and tm packages in R to analyse my corpus of 220 documents. Using the topicmodels package I have extracted key topics using LDA. I now have a tidy dataframe that ...
1
vote
1answer
346 views

Assign sentences to their respective topics using LDA

Is there a way to find out what sentences fall under which topic detected using Latent Dirichlet Allocation (LDA)? Assume I have already used LDA to extract topics. Now I want to determine which ...
0
votes
0answers
19 views

Split mixed distribution into separate ones

There is a set of customers who are doing actions. Each customer can have multiple roles. Each action is driven by a particular role that customer have. For example: $Customer_1$ has two roles: $...
0
votes
0answers
25 views

Using LDA on sentences of speeches

I can not find a thread or question on the internet which matches my particular case. I want to know whether my approach is fine. I want to compare the sentiment (tone) of particular topics in ...
0
votes
1answer
594 views

Seeded LDA using topicmodels in R

I would like to perform a LDA in R by means of topicmodels. To make the resulting topics better match the topics I want to see, I would like to input "seed words" for these topics into the LDA, ...
0
votes
0answers
266 views

Why can't K-means be used on LDA output

I started working on a topic definition task and my initial approach was as follows: Use LDA (Latent Dirichlet Allocation) to obtain the initial topic distribution for each of my documents. Then use ...
0
votes
1answer
32 views

How to see the words shared across topics in LDA model?

I am trying to find the words that are shared across the topics and words unique to a topic using LDA model in R. Is there any package or function? Thanks
1
vote
1answer
100 views

How to implement topic modelling in regression analysis

I have a dataset consisting of hotel reviews, ratings, and other features such as traveller type, and word count of the review. I want to perform topic modeling (LDA) and use the topics derived from ...
1
vote
1answer
3k views

How does topic coherence score in LDA intuitively makes sense ?

referring to: http://qpleple.com/topic-coherence-to-evaluate-topic-models/ In order to decide the optimum number of topics to be extracted using LDA, topic coherence score is always used to measure ...
0
votes
1answer
30 views

Definition of distribution conditioned on both a categorical and Dirichlet prior

If we have a conditional categorical distribution, with unknown parameters, we can represent with a table, as in the example below: \begin{align*} &z \quad P(z|\theta)\\ &0 \quad \theta_0\\ &...
0
votes
1answer
182 views

Assess the dependence of LDA on the random seed

New to latent Dirichlet Allocation (LDA), I would like to be sure that my output (in the first the step, the word-per-topic probabilities) depends on the input merely, and is (somewhat) stable ...
0
votes
0answers
40 views

Recovering $\theta$ in Dirichlet-Multinomial (Polya) distribution

I'm working on Latent Dirichlet Allocation with Collapsed Gibbs Sampling. LDA has two Dirichlet-Multinomial distribution and one of them is a document-topic distribution that determines the ...
0
votes
0answers
18 views

Evaluating accuracy of the classifier based on sample?

I have a rather odd question which unfortunately goes beyond my knowledge of stats so any advice will be much appreciated. We built a clustering model on the text data (LDA) and then assigned classes ...
2
votes
1answer
252 views

Can I use word2vec vectors as input features to NMF or LDA?

I'm trying to do some topic modelling on my corpus and I want to use Word2Vec vectors as an input to my NMF and LDA models. How do I do this? Is it even possible?
1
vote
1answer
1k views

LDA and test data perplexity [closed]

I've performed Latent Dirichlet Analysis on a training set of documents. At the ideal number of topics I would expect a minimum of perplexity for the test dataset. However, I find that the ...
1
vote
0answers
77 views

how is the vector representation of a out of sample document calculated on gensim's LDA implementation? [closed]

I am not sure of how gensim's LDA implementation obtains the vector representation of an unseen document. ...
0
votes
1answer
17 views

What ML architectures might be best to classify text as containing an event or not?

I was looking for some ML/NLP advice. I have 50,000 newsletters (emails) that are labelled either “event” or “not event”. Here is an example of each: Not event: ...
1
vote
0answers
172 views

LDA implementaion in pymc3

I am implementing LDA with pymc3 using the referred code for pymc from the post Latent Dirichlet Allocation in PyMC I am trying to use it for pymc3 bt having problems defining ...
0
votes
1answer
101 views

Joint distribution in latent Dirichlet model

Given the graphical model of LDA (latent Dirichlet model) We have the factorization of the joint distribution $$P = \prod_{d = 1}^{D}P(\theta_{d}|\alpha)\prod_{n = 1}^{N}P(z_{d, n}|\theta_d)P(w_{d, ...
2
votes
1answer
67 views

Generalized Additive Model for timely trends of topics generated via Latent Dirichlet Allocation?

I am conducting a topic modeling study via Latent Dirichlet Allocation (LDA) on scientifc abstracts over a range of about 20 years (in R). One of the outputs of LDA is a document-topic-distribution ...
1
vote
0answers
23 views

Classifying trending and not trending topics using LDA

How can we differentiate the topics obtained from LDA as trending and not trending topics? What are the factors we can consider for this classification?
1
vote
1answer
60 views

How Specifically do Sampling methods help in training Machine learning models?

I get the gist of sampling methods in probability. These algorithms were developed while building the Atom Bomb to estimate some distribution. The idea was just to try a simulation and note the ...
0
votes
1answer
228 views

How to improve performance for LDA?

I am running LDA on health-related data. Specifically I have ~500 documents that contain interviews that last around 5-7 pages. Other than that, I cannot really go into the details of the data due to ...
3
votes
1answer
582 views

Reasonable hyperparameter range for Latent Dirichlet Allocation?

What are good ranges for the hyperparameters $\alpha$ and $\beta$ (explained well here) in LDA? I appreciate hyperparameter tuning always depends on the use case, data, content of documents etc., but ...
2
votes
1answer
337 views

Understanding the role of document size parameters in Latent Dirichlet Allocation

I am writing a pymc3-based implementation of Latent Dirichlet Allocation, and am referencing this CrossValidated answer (modified for pymc3) as well as pymc3's own tutorial on LDA, in addition to the ...
2
votes
0answers
51 views

Is the Latent Dirichlet Allocation topic posterior multimodal?

In fitting the Latent Dirichlet Allocation with collapsed Gibbs sampling one builds a sampled approximation to the topic posterior distribution, $P(z|w)$ and use that to calculate the topic and word ...
-1
votes
1answer
120 views

In LDA, after collapsed Gibbs sampling, how to estimate values of other latent variables?

I watched a video on coursera, everything went well until the following slide around 12'50''. I read it in other papers that to estimate latent variables say $\Phi$ we can draw a sample $Z'$ of the ...
1
vote
0answers
69 views

Jensen's inequality in Collaborative Topic Regression

I am reading the article Collaborative Topic Modeling for Recommending Scientific Articles and could notice the application of Jensen's inequality in order to define a bound from which optimization is ...
0
votes
1answer
294 views

What is the benefit of using asymmetric LDA prior?

I am reading the paper Rethinking LDA: Why Priors Matter. The author claims that the combination of asymmetric prior for document-topic proportion and symmetric prior for topic-word is the best, ...
1
vote
0answers
112 views

Are there any good WarpLDA python implementations?

I'm trying to implement LDA in either R or Python on a production system. I'd prefer Python because more of the team is comfortable with it, but either are an option. In short, R's text2vec package ...
0
votes
2answers
354 views

latent dirichlet allocation: complexity and implementation details

I was confused by how LDA (by the original variational inference) can be implemented in a way such that the number of operations for each document $j$ is $\mathcal{O}(N_j~K)$, where $N_j$ is the ...
1
vote
2answers
154 views

Does Latent Dirchlet Allocation Work with Bag Of Words Model?

I was watching a tutorial on topic modeling and no-where they talk if the number in the bag of words model is significant. i.e. they only care whether word "a" belongs in the document or not, how ...
6
votes
2answers
2k views

How does LDA (Latent Dirichlet Allocation) assign a topic-distribution to a new document?

I am new to topic modeling and read about LDA and NMF (Non-negative Matrix Factorization). I understand the training process work. Let's say I have 100 documents and I want to train an LDA for these ...