From my understanding, biterm.perplexity() takes in three inputs: p_wz, the topics vs. words probabilities matrix (T x W); p_zd, the documents vs. topics probabilities matrix (D x T); and T, the number of topics. Those inputs are often the same output of other topic models, as well.
May I ask if it is possible to use biterm.perplexity() to calculate the perplexity by Heinrich (2005) of other topic models?
Hello! Yes, it is possible to use it with the other models. And you should be careful with the shapes of these matrices. We are using this method with tomotopy LDA model in our lab.
From my understanding,
biterm.perplexity()
takes in three inputs:p_wz
, the topics vs. words probabilities matrix (T x W);p_zd
, the documents vs. topics probabilities matrix (D x T); andT
, the number of topics. Those inputs are often the same output of other topic models, as well.May I ask if it is possible to use
biterm.perplexity()
to calculate the perplexity by Heinrich (2005) of other topic models?Thank you!