Kashipur calculate the bigram probability
Solved Step by step with explanation- Bigram Probability & Perplexity
Question
<s> students from Kota are engineer </s> Test data: <s> students are from Kashipur </s> (A) Find the Bigram probability of the given test data. (B) Find the perplexity value for this test data using the Bigram probability
Answer
Solved Step by step with explanation- Bigram Probability & Perplexity
3. "are from"
4. "from Kashipur"
2. P (are | students) = Count (students are) / Count(students) = 1 / 2 = 0.5
3. P (from | are) = Count (are from) / Count(are) = 1 / 1 = 1.0
Perplexity = 1 / (P(w1) * P(w2 | w1) * P(w3 | w2) * ... * P(wn | wn-1))
Here, we need to calculate the product of the bigram probabilities for each consecutive pair of words in the test data.
P(w4 | w3) = P(from | are) = 1.0
P(w5 | w4) = P(Kashipur | from) = 1.0


