Question: K - means code in Matlab is provided to you, which performs K - means clustering on a given dataset of observations. Check what parameters
means code in Matlab is provided to you, which performs Kmeans clustering on a
given dataset of observations. Check what parameters this function takes as input
and apply it for partitioning the Old Faithful datagiven to you in txt file into
clusters.
a Determine the cluster centre values
marks
b Using a higher number of clusters, determine the cluster centre
values.
marks
One way to measure the quality of the means clustering solution is to compute the
sumsquared error. Error function for means clustering with clusters, sample points
dots, and centers of clusters dots, is given as:
where is treated as when point belongs to cluster otherwise
c Modify your kmeans implementation so as to compute the sumsquared
error on each iteration. Does this error decrease after each iteration?
Increase the number of clusters and list the values of error function.
marks
Instead of updating by computing the mean, we use stochastic gradient descent,
to remodel the mi such that :
with learning rate step size
Recall that in the update step of the standard Kmean algorithm, we assign each cluster
centre to be the mean centroid of the data points closest to that centre. It turns out that a
particular choice of the learning rate which may be different for each cluster makes the
two algorithms batch gradient descent and the standard kmeans algorithm have identical
update steps. Let's focus on the update for the first cluster, with center
d Implement the equation instead of mean in the standard algorithm and find the
learning rate value, such that the value of both algorithms perform the same
update for
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
