Learn Before
Concept

Maximum Likelihood Estimation (MLE) for N-grams

To estimate the parameters of an n-gram model, we can use Maximum Likelihood Estimation (MLE). This involves getting counts from a training corpus and normalizing them so that they lie between 0 and 1. The MLE for an n-gram calculates the conditional probability of the next word by taking its relative frequency:

P(wnwnN+1:n1)=C(wnN+1:n1wn)C(wnN+1:n1)P(w_n|w_{n-N+1:n-1}) = \frac{C(w_{n-N+1:n-1} w_n)}{C(w_{n-N+1:n-1})}

0

1

Updated 2026-06-17

Tags

Data Science

Learn After