iit-cs429 / main

CS429: Information Retrieval @ IIT
58 stars 58 forks source link

Finals review questions. #112

Closed canichet closed 8 years ago

canichet commented 9 years ago

Has anyone solved the practice questions for the finals ? The answers I am getting are -

6) a)

points assigned to µ1 = {x1,x2,x4} points assigned to µ2 = {x3}.

new means -> µ1 = (-5/3 , 0) and µ2 = (3 , 2)

@aronwc Professor if the means are in fraction the below representation is enough ?

6) b) the error is e1 + e2 Where e1 = sqrt((-(5/3)-4)^2 + (-2)^2) + sqrt ((-(5/3)+2)^2 + (1)^2) + sqrt ((-(5/3)-1)^2 + (1)^2) e2 = sqrt((3-3)^2 + (3-2)^2)

7) a) apple 11/19 3/9 orange 8/19 6/9

b) ~ 0.379

sjain41 commented 9 years ago

I have same answers for 6 and 7 too, but for 7b i got 3/5 * 2/9 * 8/19 . 2/9 because (0+2)/(5+4). anyone else got the same answer?

arunakanagaraj commented 9 years ago

I am also confused with the 7b solution. Can anyone help understand the correct calculation for classification probability in multinomial method?

FilipeTabosa commented 9 years ago

my 7b solution was ~ 0.378. I got (3/5 * 8/19 * 8/19) / ((3/5 * 8/19 * 8/19)+ (2/5 * 2/3 * 2/3)). But I am not sure if I did it right.

canichet commented 9 years ago

Yes matches mine!

sjain41 commented 9 years ago

whys is the middle term P(apple=0 | y=1) = 8/19? from what i thought, its probability that apple is not appearing in y=1. is that correct?

FilipeTabosa commented 9 years ago

If P(apple=1| y=1) = 11/19, then P(apple=0| y=1) = 8/19

sjain41 commented 9 years ago

makes sense. thank you

sjain41 commented 9 years ago

does anyone have sample problems for KNN, Logistic regression to practice? i listened to lectures but wondering how will question look like in exam

Datguyovrder commented 9 years ago

For some reason I keep getting error 2 as 0 when using the new mean (3,2).

benjaminwalters commented 9 years ago

I got the same answer as @Datguyovrder. It makes sense since the mean is the same as the point.

vivekpabani commented 9 years ago

One confusion about 7-b. If we are using Multinomial Naïve Bayes, shouldn't we just ignore the term which is not in the document? The lecture note says - "Note that in Multinomial Naive Bayes, to classify a new document, we only multiply terms that occur in the document". So, shouldn't we ignore the term apple = 0?

ElaineResende commented 9 years ago

I think so @vivekpabani. Nonoccurence of terms does not affect Multinomial.

aronwc commented 9 years ago

For multinomial Naive Bayes, please see section 13.2 of your text.