Fast implementation of the optimal PNN method

Pasi Fränti, Timo Kaukoranta · 2002

We consider the codebook generation problem involved in the design of a vector quantizer. The aim is to find M code vectors (codebook) for a given set of N training vectors (training set) by minimizing the average pairwise distance between the training vectors and their representative code vectors. Straightforward implementation of the optimal pairwise nearest neighbor (PNN) takes O(N/sup 3/) time, which is rather slow in many practical situations. Fortunately much faster implementation can be obtained with rather simple modifications to the basic algorithm. We propose a fast O(/spl tau/N/sup 2/) time implementation of the optimal PNN, where /spl tau/ is observed to be significantly smaller than N in practice. We give all necessary data structures and implementation details, and give time complexity of the algorithm both in the best and in the worst case. The proposed implementation achieves the results of the optimal PNN with the same O(N) memory requirement.

Read the paper · More papers on PaperTik