#include <VectorQuantizer.h>
Inheritance diagram for prapi::VQClassifier< I, C >:

Public Methods | |
| VQClassifier (ProximityMeasure< double > *measure, int classCount=1) | |
| Create a new VectorQuantizer. | |
| VQClassifier (ProximityMeasure< double > &measure, int classCount=1) | |
| Create a new VectorQuantizer. | |
| virtual int | getBinIndex (const util::List< double > &vector) const throw (ClassificationException&) |
| Get the scalar correspondent (codebook bin index) for a multi-dimensional vector. | |
| int | getBinIndex (const Sample< double, I, C > &sample) const throw (ClassificationException&) |
| Get the scalar correspondent (codebook bin index) for a multi-dimensional vector. | |
| int | getMaxIndex () const |
| Returns the length of the code book minus one. | |
| virtual int | getClassification (Sample< double, I, C > &sample) throw (ClassificationException&) |
| Get the classification given to the closest code book vector. | |
|
util::List< Sample< double, I, C > > | getCodeBook () const |
| Get a copy of the current code book. | |
|
util::List< Sample< double, I, C > > & | codeBook () |
| Get a reference to the current code book. | |
|
const util::List< Sample< double, I, C > > & | codeBook () const |
| Get a const reference to the current code book. | |
| void | setCodeBook (util::List< Sample< double, I, C > > codeBook) |
| Set the code book. | |
| void | setBinIndexMode (bool binIndexMode) |
| Change classification mode. | |
| bool | getBinIndexMode () const |
| Get the current classification mode. | |
Protected Attributes | |
| bool | _bBinIndexMode |
|
util::List< Sample< double, I, C > > | _lstCodeBook |
|
||||||||||||||||
|
Create a new VectorQuantizer. There are no training samples as the internal code book is used as such.
|
|
||||||||||||||||
|
Create a new VectorQuantizer. There are no training samples as the internal code book is used as such.
|
|
||||||||||
|
Get the scalar correspondent (codebook bin index) for a multi-dimensional vector.
|
|
||||||||||
|
Get the scalar correspondent (codebook bin index) for a multi-dimensional vector.
Implements prapi::VectorQuantizer. |
|
||||||||||
|
Change classification mode. VQClassifier can work in two different modes. The default (intuitive) way is to assign a classification according to the trueClass field of the best matching code vector. In "bin index" mode, classification is assigned according to the index of the best matching code vector. In this mode, each code vector represents a "class". The first code vector has the index 0 and so on. |