bab2min / tomotopy

Python package of Tomoto, the Topic Modeling Tool
https://bab2min.github.io/tomotopy
MIT License
548 stars 62 forks source link

set_word_prior be used with Correlated Topic Model? #131

Closed jmparelman closed 1 year ago

jmparelman commented 2 years ago

I'm wondering if the set_word_prior function is compatible with the correlated topic model? My understanding of CTM is that the per document distribution is logistic normal and the per topic word distribution remains a Dirichlet, and in dynamic topic model the opposite is true (document distribution is Dirichlet, topic distribution is logistic normal).

For my research, I'm interested in the possibility of developing a correlated topic model where the topic distributions can also shift over time. Can the posterior topic distribution of CTM be used as the prior for a subsequent time window CTM like in the dynamic topic model? Thanks for the help/advice.

bab2min commented 2 years ago

Hi @jmparelman, Yes, it's possible that one model's posterior is used as another model's prior. However, I'm not sure if this method can provide a unified view of the entire data. Following this method, you will get separated models by time and each model is connected weakly to its previous-time model. In this scheme, only a model at time t-1 can effect a model at time t, and not vice versa. And more importantly, it is impossible to optimize the whole set of models at time t_0 to t. Thus, I think, you may build a new model, where topic correlation(CTM) and shift over time(DTM) is combined, to your research. But I don't know whether it is easy or difficult, and possible.