Perplexity
Perplexity is a measure of how well a probability model predicts a sample, often used in natural language processing to evaluate language models.
Lower perplexity indicates better performance.
where is the number of words in the sequence .
For example, for the sentence "the cat sat", if the model gives the words probabilities of 0.5, 0.4 and 0.3:
Perplexity formula:
Interpretation: model is "confused" about choosing between 2.55 equally likely words at each step.
Lower perplexity: better language model.
- 1 - perfect prediction
- 2-10 - very good
- 50-100 - weak model.