Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::OLVQ1< I, C > Class Template Reference

#include <VectorQuantizer.h>

Inheritance diagram for prapi::OLVQ1< I, C >:

prapi::VQClassifier< I, C > prapi::VectorQuantizer prapi::Classifier< double, I, C > Object EventSource< ClassificationEvent< double, I, C > > Object List of all members.

Detailed Description

template<class I = std::string, class C = int>
class prapi::OLVQ1< I, C >

OLVQ1 implements the optimized-learning-rate learning vector quantization algorithm for training the code book of a vector quantizer.


Public Methods

 OLVQ1 (ProximityMeasure< double > *measure=new EuclideanDistance< double >, int classCount=1)
 Create a new OLVQ1 vector quantizer.

 OLVQ1 (ProximityMeasure< double > &measure, int classCount=1)
 Create a new OLVQ1 vector quantizer.

void train (const util::List< Sample< double, I, C > > &trainingSamples, const util::List< Sample< double, I, C > > &initialCodeBook, double initialAlpha=0.3, unsigned int iterations=0)
 Train the code book.


Constructor & Destructor Documentation

template<class I = std::string, class C = int>
prapi::OLVQ1< I, C >::OLVQ1 ProximityMeasure< double > *    measure = new EuclideanDistance<double>,
int    classCount = 1
[inline]
 

Create a new OLVQ1 vector quantizer.

There are no training samples as the internal code book is used as such.

Parameters:
measure  the proximity measure to be used in measuring distances between vectors (autorelease).
classCount  the number of classes in the data

template<class I = std::string, class C = int>
prapi::OLVQ1< I, C >::OLVQ1 ProximityMeasure< double > &    measure,
int    classCount = 1
[inline]
 

Create a new OLVQ1 vector quantizer.

There are no training samples as the internal code book is used as such.

Parameters:
measure  the proximity measure to be used in measuring distances between vectors.
classCount  the number of classes in the data


Member Function Documentation

template<class I, class C>
void prapi::OLVQ1< I, C >::train const util::List< Sample< double, I, C > > &    trainingSamples,
const util::List< Sample< double, I, C > > &    initialCodeBook,
double    initialAlpha = 0.3,
unsigned int    iterations = 0
 

Train the code book.

Parameters:
trainingSamples  the samples to use in training
initialCodeBook  the code book to start with. Typically randomly selected training samples.
initialAlpha  the learning rate parameter, [0,1].
iterations  the number of iterations to run. If set to zero, 40 times the number of code vectors is used.


The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.