Unsupervised Learning: Difference between revisions

Line 39: Line 39:


====Algorithm====
====Algorithm====
# Randomly initialize labels <math>\mathbf{z}</math>.
# Then calculate the centroids <math>\mathbf{\mu}</math>.
# Then update the labels for each example to the closest centroid.
# Update the centroids by taking the mean of each point in the cluster.
# Repeat steps 3 and 4


===Soft K-means===
===Soft K-means===
We will develop a model for how our data is generated:<br>
We will develop a model for how our data is generated:<br>
Given <math>k</math> clusters, the probability of a point being from cluster k is <math>\phi_k = P(z^{(i)} = k)</math><br>
Given <math>k</math> clusters, the probability of a point being from cluster k is <math>\phi_k = P(z^{(i)} = k)</math><br>