Learning vector quantization

Revision as of 05:37, 28 May 2025 by imported>WikiCleanerBot (v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation))
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computer science, learning vector quantization (LVQ) is a prototype-based supervised classification algorithm. LVQ is the supervised counterpart of vector quantization systems. LVQ can be understood as a special case of an artificial neural network, more precisely, it applies a winner-take-all Hebbian learning-based approach. It is a precursor to self-organizing maps (SOM) and related to neural gas and the k-nearest neighbor algorithm (k-NN). LVQ was invented by Teuvo Kohonen.<ref>T. Kohonen. Self-Organizing Maps. Springer, Berlin, 1997.</ref>

DefinitionEdit

An LVQ system is represented by prototypes <math>W=(w(i),...,w(n))</math> which are defined in the feature space of observed data. In winner-take-all training algorithms one determines, for each data point, the prototype which is closest to the input according to a given distance measure. The position of this so-called winner prototype is then adapted, i.e. the winner is moved closer if it correctly classifies the data point or moved away if it classifies the data point incorrectly.

An advantage of LVQ is that it creates prototypes that are easy to interpret for experts in the respective application domain.<ref>Template:Citation</ref> LVQ systems can be applied to multi-class classification problems in a natural way.

A key issue in LVQ is the choice of an appropriate measure of distance or similarity for training and classification. Recently, techniques have been developed which adapt a parameterized distance measure in the course of training the system, see e.g. (Schneider, Biehl, and Hammer, 2009)<ref>Template:Cite journal</ref> and references therein.

LVQ can be a source of great help in classifying text documents.Template:Citation needed

AlgorithmEdit

The algorithms are presented as in.<ref>Template:Citation</ref>

Set up:

  • Let the data be denoted by <math>x_i \in \R^D</math>, and their corresponding labels by <math>y_i \in \{1, 2, \dots, C\}</math>.
  • The complete dataset is <math>\{(x_i, y_i)\}_{i=1}^N</math>.
  • The set of code vectors is <math>w_j \in \R^D</math>.
  • The learning rate at iteration step <math>t</math> is denoted by <math>\alpha_t</math>.
  • The hyperparameters <math>w</math> and <math>\epsilon</math> are used by LVQ2 and LVQ3. The original paper suggests <math>\epsilon \in [0.1, 0.5]</math> and <math>w \in [0.2, 0.3]</math>.

LVQ1Edit

Initialize several code vectors per label. Iterate until convergence criteria is reached.

  1. Sample a datum <math>x_i</math>, and find out the code vector <math>w_j</math>, such that <math>x_i</math> falls within the Voronoi cell of <math>w_j</math>.
  2. If its label <math>y_i</math> is the same as that of <math>w_j</math>, then <math>w_j \leftarrow w_j + \alpha_t(x_i - w_j)</math>, otherwise, <math>w_j \leftarrow w_j - \alpha_t(x_i - w_j)</math>.

LVQ2Edit

LVQ2 is the same as LVQ3, but with this sentence removed: "If <math>w_j</math> and <math>w_k</math> and <math>x_i</math> have the same class, then <math>w_j \leftarrow w_j - \alpha_t(x_i - w_j)</math> and <math>w_k \leftarrow w_k + \alpha_t(x_i - w_k)</math>.". If <math>w_j</math> and <math>w_k</math> and <math>x_i</math> have the same class, then nothing happens.

LVQ3Edit

File:Apollonian circles.svg
Some Apollonian circles. Every blue circle intersects every red circle at a right angle. Every red circle passes through the two points Template:Mvar, and every blue circle separates the two points.

Initialize several code vectors per label. Iterate until convergence criteria is reached.

  1. Sample a datum <math>x_i</math>, and find out two code vectors <math>w_j, w_k</math> closest to it.
  2. Let <math>d_j := \|x_i - w_j\|, d_k := \|x_i - w_k\|</math>.
  3. If <math>\min \left(\frac{d_j}{d_k}, \frac{d_k}{d_j}\right)>s </math>, where <math>s=\frac{1-w}{1+w}</math>, then
    • If <math>w_j</math> and <math>x_i</math> have the same class, and <math>w_k</math> and <math>x_i</math> have different classes, then <math>w_j \leftarrow w_j + \alpha_t(x_i - w_j)</math> and <math>w_k \leftarrow w_k - \alpha_t(x_i - w_k)</math>.
    • If <math>w_k</math> and <math>x_i</math> have the same class, and <math>w_j</math> and <math>x_i</math> have different classes, then <math>w_j \leftarrow w_j - \alpha_t(x_i - w_j)</math> and <math>w_k \leftarrow w_k + \alpha_t(x_i - w_k)</math>.
    • If <math>w_j</math> and <math>w_k</math> and <math>x_i</math> have the same class, then <math>w_j \leftarrow w_j - \epsilon\alpha_t(x_i - w_j)</math> and <math>w_k \leftarrow w_k + \epsilon\alpha_t(x_i - w_k)</math>.
    • If <math>w_k</math> and <math>x_i</math> have different classes, and <math>w_j</math> and <math>x_i</math> have different classes, then the original paper simply does not explain what happens in this case, but presumably nothing happens in this case.
  4. Otherwise, skip.

Note that condition <math>\min \left(\frac{d_j}{d_k}, \frac{d_k}{d_j}\right)>s </math>, where <math>s=\frac{1-w}{1+w}</math>, precisely means that the point <math>x_i</math> falls between two Apollonian spheres.

ReferencesEdit

<references />

Further readingEdit

External linksEdit

  • lvq_pak official release (1996) by Kohonen and his team