A Dynamic Approach to Learning Vector Quantization