Learn Before
Formula

General equation of n-gram

Under the N-gram Markov assumption, the probability of the next word is approximated using only the preceding N1N-1 words: P(wnw1:n1)P(wnwnN+1:n1)P(w_n|w_{1:n-1}) \approx P(w_n|w_{n-N+1:n-1}) Applying this approximation to the chain-rule factorization gives the sequence probability: P(w1:n)k=1nP(wkwkN+1:k1)P(w_{1:n}) \approx \prod_{k=1}^{n}P(w_k|w_{k-N+1:k-1})

0

1

Updated 2026-08-11

Tags

Deep Learning

Data Science

Machine Learning Yearning @ DeepLearning.AI

Dive into Deep Learning @ D2L

Machine Learning

Supervised Learning