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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

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
6 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
17 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
14 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
53 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
68 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
41 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 ...
0
votes
1answer
188 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
15 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
23 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
329 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
172 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
27 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
54 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
1k 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
29 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
133 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
37 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
208 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
889 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
76 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
157 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
85 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
60 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 ...
0
votes
0answers
44 views

Using GARCH and LDA

I'm working on a regression model using Latent Dirichlet Allocation (LDA). Using daily news data, I'm using a GARCH-model to see if different topics found using LDA indeed are significant in the ...
1
vote
0answers
20 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
59 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
203 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
485 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
282 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
43 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
94 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
59 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
237 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
104 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
283 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
118 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 ...
0
votes
1answer
3k views

Inferring the number of topics for gensim's LDA - perplexity, CM, AIC, and BIC

I am confused as to how to interpret the LDA's perplexity fluctuations with different numbers of topics, in the endeavour of determining the best number of topics. Additionally, I would like to know ...
1
vote
1answer
226 views

Is it fair to compare latent dirichlet allocation to c-means clustering?

I'm trying to think of a good way to explain latent dirichlet allocation (LDA) to an audience that knows a decent amount about clustering, but nothing about text analysis. Is it fair to draw a ...
0
votes
1answer
159 views

From LDA output to W2V to K-means?

I'm working on review data where each review is labeled as positive or negative. My aim is to find topics in those reviews which are perceived either positive or negative. Therefore I performed a LDA ...
0
votes
0answers
224 views

Why does NMF perform better than LDA on shorter textual inputs

For the reading that I have done, I found that Dirichlet priors typically don't perform well when they aren't given significant amounts of data. I'm not quite sure why that is. What is it about NMF ...
2
votes
0answers
86 views

What is the result for EM algorithm in smoothed LDA model?

In the original LDA paper (Blei2003), EM algorithm estimates $\alpha$ and $\beta$ in Fig.5. So, what is the result for Fig.7? Will it give estimation of $\alpha, \beta$ or $\alpha, \eta$? And, if I ...
3
votes
1answer
133 views

Gibbs sampling in Hierarchically Supervised LDA (HSLDA)

TL;DR In the HSLDA paper by Perotte et al, the posterior conditional distribution of $z_{d,n}$ for Gibbs Sampling is specified as: \begin{equation*} p(z_{d,n}=k| \mathbf{z}_{-d,n}, \mathbf{a}, \...
5
votes
1answer
766 views

What's the relation between Matrix Factorization (MF) and Latent Dirichlet Allocation (LDA)?

My understanding is that both MF and LDA can be applied to do document classification. I will first summarize my understand about these two methods before I ask my questions. Assuming we use a big ...
1
vote
0answers
56 views

Latent Dirichlet Allocation with Very Specific Word and Topic Collection from Documentation

Let's say I work in a company that does something and most of the time the employees are confused about something and ask them using some company-made apps. The thing is, most of the time, new ...
1
vote
1answer
183 views

Where does the exponential time complexity in LDA's posterior of topics arise?

In Finding scientific topics (PNAS 2004) the authors derive the (marginalized) posterior distribution of topic assignments given the observed word and arrive at equation (4). Then, immediately after, ...
0
votes
0answers
424 views

Ways to compare LDA document distributions?

I have an LDA model trained on a corpus of documents. The output of the model is a distribution over topics for each document; an $M\times K$ matrix, where $M$ is the number of documents in the corpus,...