And then in the Algorithm, you may recall that,

we're going to repeat E-step and M-step to improve our parameter estimation.

In this case, we're going to improve the clustering result

iteratively by also doing two steps.

And in fact that the two steps are very similar to Algorithm, in that when we

locate the vector into one of the clusters based on our tentative clustering.

It's very similar to inferring the distribution that has been used to

generate the document, the mixture model.

So it is essentially similar to E-step, so

what's the difference, well the difference is here.

We don't make a probabilistic allocation as in the case of E-step,

the brother will make a choice.

We're going to make a call if this, there upon this closest to cluster two,

then we're going to say you are in cluster two.

So there's no choice, and

we're not going to say, you assume the set is belonging to a cluster two.

And so we're not going to have a probability, but

we're just going to put one object into precisely one cluster.

In the E-step however, we do a probability location, so we split in counts.

And we're not going to say exactly which distribution has

been used to generate a data point.

Now next, we're going to adjust the centroid, and

this is very similar to M-step where we re-estimate the parameters.

That's when we'll have a better estimate of the parameter, so

here we'll have a better clustering result by adjusting the centroid.

And note that centroid is based on the average of the vectors in the cluster.

So this is also similar to the M-step where we do counts,pull together counts

and then normalize them.

The difference of course is also because of the difference in the E-step, and

we're not going to consider probabilities when we count the points.

In this case,

k-Means we're going to all make count of the objects as allocated to this cluster.

And this is only a subset of data points, but in the Algorithm,

we in principle consider all the data points based on probabilistic allocations.