What formula is used to calculate perplexity in fitlda?

조회 수: 1 (최근 30일)
Stephen Bruestle
Stephen Bruestle 2019년 1월 22일
답변: Ilya 2019년 3월 13일
Many sources have different formulas. I want to make sure that I am referencing the correct formula.

채택된 답변

Ilya
Ilya 2019년 3월 13일
If you are asking about the 2nd output from the logp method, document log-probabilities are estimated using the Mean-Field Approximation described in the paper cited at the bottom of that doc page. Perplexity is then
exp(-sum(logprob)/Nwords)
where Nwords is the total word count across all documents.
If you are asking about perplexity displayed during training when you pass 'Verbose' to fitlda, those document log-probabilities are computed using current estimates of topic probabilities per document. The perplexity formula is the same as above. Because document log-probabilities are evaluated at the max likelihood estimates of topic probabilities per document, these document probabilities are overestimated and perplexity is therefore underestimated. This is done for speed. The MFA approach gives a more accurate estimate by integtrating over topic probabilities at the cost of longer runtime.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by