n terms of
the following algorithm, which assumes the number of clusters <span class="math inline">\(K\)</span> and
data vectors <span class="math inline">\(y\)</span> as input.</p>
<ol style="list-style-type: decimal">
<li>For each <span class="math inline">\(n\)</span> in <span class="math inline">\(1:N\)</span>, randomly assign vector <span class="math inline">\(y_n\)</span> to a cluster in <span class="math inline">\(1{:}K\)</span>;</li>
<li>Repeat
<ol style="list-style-type: decimal">
<li>For each clus