Question: 3.2 Train a multinomial Naive Bayes Classifier with no smoothing using D1, D2, D3, D4. Let's train a multinomial Naive Bayes Classifier with no smoothing

3.2 Train a multinomial Naive Bayes Classifier with no smoothing using D1, D2, D3, D4.

Let's train a multinomial Naive Bayes Classifier with no smoothing using the training documents (i.e., D1, D2, D3, D4). Note each record has three tab separated fields:

-Document ID

-class (where 11 denotes Chinese; and 00 denotes not Chinese)

-document content

Document ID class document content Training D1 1 Chinese Beijing Chinese D2 1 Chinese Chinese Shanghai D3 1 Chinese Macao D4 0 Tokyo Japan Chinese Test D5 ? Chinese Chinese Chinese Tokyo Japan

The word class conditionals, (|) , are given in the following table.

word Pr(word |Class==0) Pr(word|Class==1) Chinese 1/3 5/8 Beijing 0 1/8 Shanghai 0 1/8 Macao 0 1/8 Tokyo 1/3 0 Japan 1/3 0

Calculate the posterior probabilities for D5 given an unsmoothed MNB model

D5 Chinese Chinese Chinese Tokyo Japan

What is the class of D5? What is the posterior probabilities of D5 (Pr(Class=0|D5) versus Pr(Class=1|D5)?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!