ecvqtrain trains codebooks for use in entropy-constrained vector quantization (ECVQ) (see ecvqencode(1) ). trainingfile is an input data file in DAT format which contains training vectors. codebookfile is the output file in CBK format which contains the codewords which form the codebook. Initial codewords are chosen at random, unless initialcodebookfile is specified.
lambda (a floating point value) is the Lagrangian-multiplier "rate-distortion" parameter that controls the trade-off between rate and distortion in a cost function used in the iterative descent algorithm. This cost function takes the form of J(i) = D(i) + lambda * R(i) where D(i) is the average distortion and R(i) is the average rate (estimated from codeword probabilities) for iteration i. See the paper by Chou, Lookabaugh, and Gray cited below for more details on the training algorithm.
Because the ECVQ training usually reduces the codebook size during training, the output codebook, codebookfile, may contain fewer codewords than the the initial codebook (as specified by initialcodebookfile or by the -s option).
P. A. Chou, T. Lookabaugh, and R. M. Gray, "Entropy-constrained Vector Quantization," IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 37, pp. 31-42, January 1989.