Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

K - means code in Matlab is provided to you, which performs K - means clustering on a given dataset of observations. Check what parameters

K-means code in Matlab is provided to you, which performs K-means clustering on a
given dataset of observations. Check what parameters this function takes as input
and apply it for partitioning the Old Faithful data(given to you in .txt file) into K=2
clusters.
a) Determine the cluster centre values
(2 marks).
b) Using a higher number of clusters, K=4, determine the cluster centre
values.
(2 marks)
One way to measure the quality of the K-means clustering solution is to compute the
sum-squared error. Error function for k-means clustering with k clusters, sample points
x1,dots,xn, and centers of clusters m1,dots,mk is given as:
E=1Nk=1Kn=1Nzkn||xn-mk||2
where Zkn is treated as 1 when point xn belongs to cluster k, otherwise Zkn=0
c) Modify your k-means implementation so as to compute the sum-squared
error on each iteration. Does this error decrease after each iteration?
Increase the number of clusters K, and list the values of error function.
(5 marks)
Instead of updating mj by computing the mean, we use stochastic gradient descent,
to remodel the mi such that :
mi=mi+zkn(xn-mi)
with learning rate (step size).
Recall that in the update step of the standard K-mean 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 k-means algorithm) have identical
update steps. Let's focus on the update for the first cluster, with center m1.
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 m1.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions

Question

What do the following acronyms stand for: FICA, FUTA, and SUTA?

Answered: 1 week ago