程序代写案例-CS 4720-7720

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
MiniProject 5
ECE/CS 4720-7720 Machine Learning and Pattern Recognition
Question 1
This question is to demonstrate that: 1) when the selected model is poor, the maximum-likelihood classifier does not produce
satisfactory results; and 2) proper transformation of the data can compensate for poor models. The dataset1 used for this
question is divided into training2 and test3 data, with each one consisting of 3 classes in a 2D-feature space.
a) Assuming Gaussian distribution for all three class conditional densities, and with unknown means and covariances,
compute the maximum likelihood estimates for each class using the training data.
b) Ignore the priors, i.e. assume 1/3 for all three classes, and redo parts a) and b) of MiniProject 2, Question 1, and use
those same Matlab functions in part c) below. Use the means and variances from part a) above.
c) Classify the test data and compute the test error using confusion matrix4.
d) Bayesian estimates. The data has a simpler description when seen in polar coordinates. Use cart2pol() to transform all
the data points to polar coordinates. Use scatter() to plot the transformed points. What you should find is that the transformed
data looks Gaussian on the radius r and uniform on the angle θ . So, ignore the angle θ and classify the test data only on r as
follows.
The problem is now 1-D and again, if you inspect the data, Gaussian distribution is a more suitable pdf to describe all three
classes. Assume then that each class has p(r|ωi) =N
(
µi,σ2
)
with µi unknown and variance σ2 = 0.23 for all three classes. Let
the only prior knowledge about µi be p(µi) = N
(
µ0 = 0, σ20 = 110
)
and compute the Bayes estimates for µi and the posterior
distribution p(µi|Di) of all three classes. Next compute p(r|ωi,Di) =
´
p(r|µi) p(µi|Di)dµi and use this density estimate to
classify the test data and compute the test error using confusion matrix.
Do not forget to comment on the results from each step above.
1http://vigir.missouri.edu/~gdesouza/ece7720/test_train_data_class3.mat
2access the training data by TrainPts = Data.train
3access the test data by TestPts = Data.test
4http://vigir.missouri.edu/~gdesouza/ece7720/Lecture_Notes/Lecture10.pdf
1

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468