Learning vector quantization
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.[1]
Definition
[edit ]An LVQ system is represented by prototypes {\displaystyle W=(w(i),...,w(n))} 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.[2] 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)[3] and references therein.
LVQ can be a source of great help in classifying text documents.[citation needed ]
Algorithm
[edit ]The algorithms are presented as in.[4]
Set up:
- Let the data be denoted by {\displaystyle x_{i}\in \mathbb {R} ^{D}}, and their corresponding labels by {\displaystyle y_{i}\in \{1,2,\dots ,C\}}.
- The complete dataset is {\displaystyle \{(x_{i},y_{i})\}_{i=1}^{N}}.
- The set of code vectors is {\displaystyle w_{j}\in \mathbb {R} ^{D}}.
- The learning rate at iteration step {\displaystyle t} is denoted by {\displaystyle \alpha _{t}}.
- The hyperparameters {\displaystyle w} and {\displaystyle \epsilon } are used by LVQ2 and LVQ3. The original paper suggests {\displaystyle \epsilon \in [0.1,0.5]} and {\displaystyle w\in [0.2,0.3]}.
LVQ1
[edit ]Initialize several code vectors per label. Iterate until convergence criteria is reached.
- Sample a datum {\displaystyle x_{i}}, and find out the code vector {\displaystyle w_{j}}, such that {\displaystyle x_{i}} falls within the Voronoi cell of {\displaystyle w_{j}}.
- If its label {\displaystyle y_{i}} is the same as that of {\displaystyle w_{j}}, then {\displaystyle w_{j}\leftarrow w_{j}+\alpha _{t}(x_{i}-w_{j})}, otherwise, {\displaystyle w_{j}\leftarrow w_{j}-\alpha _{t}(x_{i}-w_{j})}.
LVQ2
[edit ]LVQ2 is the same as LVQ3, but with this sentence removed: "If {\displaystyle w_{j}} and {\displaystyle w_{k}} and {\displaystyle x_{i}} have the same class, then {\displaystyle w_{j}\leftarrow w_{j}-\alpha _{t}(x_{i}-w_{j})} and {\displaystyle w_{k}\leftarrow w_{k}+\alpha _{t}(x_{i}-w_{k})}.". If {\displaystyle w_{j}} and {\displaystyle w_{k}} and {\displaystyle x_{i}} have the same class, then nothing happens.
LVQ3
[edit ]Initialize several code vectors per label. Iterate until convergence criteria is reached.
- Sample a datum {\displaystyle x_{i}}, and find out two code vectors {\displaystyle w_{j},w_{k}} closest to it.
- Let {\displaystyle d_{j}:=\|x_{i}-w_{j}\|,d_{k}:=\|x_{i}-w_{k}\|}.
- If {\displaystyle \min \left({\frac {d_{j}}{d_{k}}},{\frac {d_{k}}{d_{j}}}\right)>s}, where {\displaystyle s={\frac {1-w}{1+w}}}, then
- If {\displaystyle w_{j}} and {\displaystyle x_{i}} have the same class, and {\displaystyle w_{k}} and {\displaystyle x_{i}} have different classes, then {\displaystyle w_{j}\leftarrow w_{j}+\alpha _{t}(x_{i}-w_{j})} and {\displaystyle w_{k}\leftarrow w_{k}-\alpha _{t}(x_{i}-w_{k})}.
- If {\displaystyle w_{k}} and {\displaystyle x_{i}} have the same class, and {\displaystyle w_{j}} and {\displaystyle x_{i}} have different classes, then {\displaystyle w_{j}\leftarrow w_{j}-\alpha _{t}(x_{i}-w_{j})} and {\displaystyle w_{k}\leftarrow w_{k}+\alpha _{t}(x_{i}-w_{k})}.
- If {\displaystyle w_{j}} and {\displaystyle w_{k}} and {\displaystyle x_{i}} have the same class, then {\displaystyle w_{j}\leftarrow w_{j}-\epsilon \alpha _{t}(x_{i}-w_{j})} and {\displaystyle w_{k}\leftarrow w_{k}+\epsilon \alpha _{t}(x_{i}-w_{k})}.
- If {\displaystyle w_{k}} and {\displaystyle x_{i}} have different classes, and {\displaystyle w_{j}} and {\displaystyle x_{i}} have different classes, then the original paper simply does not explain what happens in this case, but presumably nothing happens in this case.
- Otherwise, skip.
Note that condition {\displaystyle \min \left({\frac {d_{j}}{d_{k}}},{\frac {d_{k}}{d_{j}}}\right)>s}, where {\displaystyle s={\frac {1-w}{1+w}}}, precisely means that the point {\displaystyle x_{i}} falls between two Apollonian spheres.
References
[edit ]- ^ T. Kohonen. Self-Organizing Maps. Springer, Berlin, 1997.
- ^ T. Kohonen (1995), "Learning vector quantization", in M.A. Arbib (ed.), The Handbook of Brain Theory and Neural Networks, Cambridge, MA: MIT Press, pp. 537–540
- ^ P. Schneider; B. Hammer; M. Biehl (2009). "Adaptive Relevance Matrices in Learning Vector Quantization". Neural Computation. 21 (10): 3532–3561. CiteSeerX 10.1.1.216.1183 . doi:10.1162/neco.2009.10-08-892. PMID 19635012. S2CID 17306078.
- ^ Kohonen, Teuvo (2001), "Learning Vector Quantization" , Self-Organizing Maps, vol. 30, Berlin, Heidelberg: Springer Berlin Heidelberg, pp. 245–261, doi:10.1007/978-3-642-56927-2_6, ISBN 978-3-540-67921-9
Further reading
[edit ]- Somervuo, Panu; Kohonen, Teuvo (1999). "Self-organizing maps and learning vector quantization for feature sequences". Neural Processing Letters. 10 (2): 151–159. doi:10.1023/A:1018741720065.
- Nova, David; Estévez, Pablo A. (2014年09月01日). "A review of learning vector quantization classifiers". Neural Computing and Applications. 25 (3): 511–524. arXiv:1509.07093 . doi:10.1007/s00521-013-1535-3. ISSN 1433-3058.
External links
[edit ]- lvq_pak official release (1996) by Kohonen and his team