Question: K - means. You are given three data samples: i 1 2 3 xi 1 - 1 1 4 xi 2 0 0 4 (

K-means. You are given three data samples:
i123
xi1-114
xi2004
(a)(8 points) We want to have K=2 cluster. After K-mean finishes on the above training
data, what are the centers of the two clusters? What is the equation for the boundary of
the two clusters?
(b)(7 points) Suppose you want to use clustering for outlier detection. You find cluster
means i,i=1,..., K on the training data. Then, given a new data xand a threshold
t, you declare xan outlier if kxik tfor all i. Complete the following function
to implement the outlier detection on a matrix of data X. The output is out[i]=1 if the
sample X[i,:] is an outlier, and out[i]=0 otherwise. You must specify the other inputs of
your function. Avoid for loops for full credit.
def outlier detect(X,...):
...
return out

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!