Description
1. Synthesize a 2-class problem with samples drawn from two Gaussian distributions with the
following parameters.
m=[zeros(5,1) ones(5,1)];
S(:,:,1)=[0.8 0.2 0.1 0.05 0.01;
0.2 0.7 0.1 0.03 0.02;
0.1 0.1 0.8 0.02 0.01;
0.05 0.03 0.02 0.9 0.01;
0.01 0.02 0.01 0.01 0.8];
S(:,:,2)=[0.9 0.1 0.05 0.02 0.01;
0.1 0.8 0.1 0.02 0.02;
0.05 0.1 0.7 0.02 0.01;
0.02 0.02 0.02 0.6 0.02;
0.01 0.02 0.01 0.02 0.7];
P=[1/2 1/2]’;
2. Draw πππ‘π‘π‘π‘π‘π‘π‘π‘π‘π‘ = 100 training samples with rng(0) and πππ‘π‘π‘π‘π‘π‘π‘π‘ = 10,000 test samples with
rng(100).
3. Use the training samples to learn three classifiers:
i. NaΓ―ve Bayes classifier
ii. Bayes classifier that uses MLE for parameter estimation
iii. Bayes classifier that uses the true parameter values
4. Report test errors for each classifier using the test samples
5. Repeat steps 2-4 with πππ‘π‘π‘π‘π‘π‘π‘π‘π‘π‘ = 1000.
Upload a single m-file to Blackboard before midnight on 04/05/19.