ter <span class="math inline">\(k\)</span> in <span class="math inline">\(1{:}K\)</span>, compute the cluster centroid <span class="math inline">\(\mu_k\)</span> by averaging the vectors assigned to that cluster;</li>
<li>For each <span class="math inline">\(n\)</span> in <span class="math inline">\(1:N\)</span>, reassign <span class="math inline">\(y_n\)</span> to the cluster <span class="math inline">\(k\)</span> for which the (Euclidean) distance from <span class="math inline">\(y_n\)</span> to <span cla