Learning vector quantization: Difference between revisions

Content deleted Content added
Line 24:
 
The algorithm's flow is:
# For next input <math>\vec{x}</math> (with label <math>y</math>) in <math> L </math> find the closest neuron <math>\vec{w_m}</math>, <br>i.e. <math>d(\vec{x},\vec{w_m}) = \min\limits_i {d(\vec{x},\vec{w_i})} </math>, where <math>\, d</math> is the metric used ( [[Euclidean distance|Euclidean]], etc. ).
# Update <math>\vec{w_m}</math>. A better explanation is get <math>\vec{w_m}</math> closer to the input <math>\vec{x}</math>, if <math>\vec{x}</math> and <math>\vec{w_m}</math> belong to the same label and get them further apart if they don't. <br><math> \vec{w_m} \gets \vec{w_m} + \eta \cdot \left( \vec{x} - \vec{w_m} \right) </math> if <math> c_m = y</math> (closer together) <br> or <math> \vec{w_m} \gets \vec{w_m} - \eta \cdot \left( \vec{x} - \vec{w_m} \right) </math> if <math> c_m \neq y</math> (further apart).
# While there are vectors left in <math> L </math> go to step 1, else terminate.