Skip to content

kmeans_quantizer

nickgillian edited this page Aug 21, 2016 · 5 revisions

#KMeans Quantizer

##Description The KMeansQuantizer module quantizes an N-dimensional input vector to a 1-dimensional discrete value. This quantized value will be between [0 K-1], where K is the number of clusters used to create the quantization model. The KMeansQuantizer can be useful as input to classifiers such as Hidden Markov Models, which require a discrete integer as an input as opposed to a continuous floating point N-dimensional vector.

Before you use the KMeansQuantizer, you need to train a quantization model. To do this, you select the number of clusters you want your quantizer to have and then give it any training data in the following formats:

The KMeansQuantizer class is part of the Feature Extraction Modules.

KMeansQuantizer An example of running the KMeansQuantizer on an example dataset. The quantizer was trained using the same dataset with the number of clusters parameter set to 10. The top figure shows the example data used as input to the quantizer. The bottom figure shows the output of the quantizer (the quantized output is a value between [0 9]).

##Example KMeansQuantizer Example