Question: ( a ) ( 3 marks ) A training set consists of one dimensional examples from two classes. The training examples from class 1 are

(a)(3 marks) A training set consists of one dimensional examples from two classes. The training examples from class 1 are {0.5,0.1,0.2,0.4,0.3,0.2,0.2,0.1,0.35,0.25} and from class 2 are {0.9,0.8,0.75,1.0}. Fit a (one dimensional) Gaussian using Maximum Likelihood to each of these two classes. You can assume that the variance for class 1 is 0.0149, and the variance for class 2 is 0.0092. Also estimate the class probabilities p1 and p2 using Maximum Likelihood. What is the probability that the test point x=0.6 belongs to class 1?
(b)(3 marks) You are now going to make a text classifier. To begin with, you attempt to classify documents as either sport or politics. You decide to represent each document as a (row) vector of attributes describing the presence or absence of the following words.
x=(goal,football,golf, defence,offence,wicket,office,strategy)
Training data from sport documents and from politics documents is represented below in a matrix in which each row represents the 8 attributes.
xpolitics=[10111011001001100110100100110100011011
00011001]
0
0
0
1
0
0
0
1
0
xsport=[1100000001000001010000101000110110000010100]
0
1
1
1
0
Using a maximum likelihood naive Bayes classifier, what is the probability that the document x=(1,0,0,1,1,1,1,0) is about politics?
( a ) ( 3 marks ) A training set consists of one

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 Finance Questions!