Professional Documents
Culture Documents
Observations:
5. As the data sample size is increasing, absolute value of log likelihood value is increasing
and EM algorithm is giving better estimates, since EM algorithm maximizes the
expectation of complete data log likelihood (or minimizes the negative log likelihood).
6. As iteration number increases, log likelihood value is increasing (or negative log likelihood
value is decreasing) which is validating the convergence of EM algorithm.
7. EM algorithm is very sensitive to initializations. EM algorithms is giving better
performance with the initial values which are generated from k-means clustering algorithm
(k=4). Since, k-means clustering aims to partition the data samples into k-clusters in which
each data sample belongs to the cluster with the nearest mean, serving as a prototype of the
cluster. Randomly initialized EM algorithm doesn't give better performance compared to
K-means clustering initialized EM algorithm. If the random initialization of means of all
the densities are very close, then EM algorithm is not giving accurate estimates.
8. EM algorithm accuracy depends on number of mixture components (k). If k = 4 EM
algorithm estimated density perfectly fits the data histogram because the actual model of
the data has 4 mixture density components. If k =2 (k<4) EM algorithm estimated density
doesn't fit the data histogram perfectly since the actual model of the data has 4 mixture
densities. If k=6 (k>4) EM algorithm estimated density overfits the data histogram.
Q3:
Explanation:
This problem is 2-class classification problem where class conditional densities are mixtures of
Gaussians. Bayes' classifiers are implemented.
Class conditional densities are estimated in two ways:
(i) The class conditional densities are mixture of two Gaussians and estimating the density using
EM algorithm
(ii) the class conditional densities are single Gaussians and estimating it using maximum likelihood
method
The accuracies of these two Bayes' classifiers are compared and also these classifiers are compared
with nearest neighbour classifier.
Given data: class conditional densities: f1 – N(0,2), f2 – N(2,2), f3 – N(4,2), f4 – N(6,2)
DataSet1:
Histogram:
Observations:
1. In all the cases Bayes' classifier using both ML estimation and EM algorithm estimation is
outperforming than the nearest neighbour classifier.
2. Accuracy of EM algorithm for dataset1 is high compared to accuracy of dataset2. In
dataset1 case means of class conditional densities are well separated. So the overlapping
region of class 1 and class2 densities of dataset2 is high compared to dataset1. So Bayes'
classifier with these class conditional densities is not performing better. For ML estimation
also the same reason is valid.
3. EM algorithms is giving better performance with the initial values which are generated
from k-means clustering algorithm (k=2). Since, k-means clustering aims to partition the
data samples into k-clusters in which each data sample belongs to the cluster with the
nearest mean, serving as a prototype of the cluster.
4. EM algorithm accuracy depends on number of mixture components (k). If k = 2 EM
algorithm estimated density perfectly fits the data histogram because the actual model of
the data has 2 mixture density components. If k =1 (k<2) EM algorithm estimated density
doesn't fit the data histogram perfectly since the actual model of the data has 4 mixture
densities. So when the classifier is designed with these this class conditional densities it
doesn't give better accuracy. If k=4 (k>2) EM algorithm estimated density overfits the
data histogram. The classifier gives better accuracy. But it can't have generalization ability.
Q4:
Explanation:
This problem is 2-class classification problem where class conditional densities are mixtures of
Gaussians. Bayes' classifiers are implemented.
Class conditional densities are estimated in two ways:
(i) The class conditional densities are mixture of two Gaussians and estimating the density using
EM algorithm
(ii) the class conditional densities are single Gaussians and estimating it using maximum likelihood
method
The accuracies of these two Bayes' classifiers are compared and also these classifiers are compared
with nearest neighbour classifier.
Given data: class conditional densities: f1 – N(0,2), f2 – N(4,2), f3 – N(8,2), f4 – N(12,2)
DataSet1:
Histogram:
Class1: 0.5f1 + 0.5f2 Class2: 0.5f3+0.5f4
Results:
Initialized values for EM algorithm for class one:
means:[0.9, 3]
variances:[1.5, 3]
convex coefficients:[0.5, 0.5]
Initialized values for EM algorithm for class two:
means:[6.9, 11.6]
variances:[1.5, 3.4]
convex coefficients:[0.5, 0.5]
For full size of training data,
Estimated parameters using ML:
Class1: mean = 1.98873822 variance = 10.03301297
Class2: mean = 6.06924616 variance = 5.73212566
Estimated parameters using EM:
Class 1:
Means: 1.732479, 2.11602963
variances = 1.732479, 2.11602963
Convex coefficients: 0.4545, 0.5454
Class 2:
Means: 7.6593934], 11.43740568
Variances: 1.44899449, 2.96050072
Convex coefficients: 0.3717, 0.6282
DataSet2:
Histogram: