Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::MahalanobisClassifier< T, I, C > Class Template Reference

#include <MahalanobisClassifier.h>

Inheritance diagram for prapi::MahalanobisClassifier< T, I, C >:

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

Detailed Description

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

Mahalanobis classifier classifies unknown samples according to the Mahalanobis distance d2(si, mj) = (si - mj) Cj-1 (si - mj)T, where s and m are sample and model feature vectors, respectively.

Cj-1 is the inverse of the covariance matrix for class j.


Public Methods

 MahalanobisClassifier (util::List< Sample< T, I, C > > *trainingSamples, int classCount)
 Initialize a MahalanobisClassifier with the given set of training samples and number of classes.

getClassification (Sample< T, I, C > &sample) throw (ClassificationException&)
 Get classification for a sample.

void setTrainingSamples (util::List< Sample< T, I, C > > *lst)
 Overridden to calculate covariance matrices from training data.


Constructor & Destructor Documentation

template<class T, class I, class C>
prapi::MahalanobisClassifier< T, I, C >::MahalanobisClassifier util::List< Sample< T, I, C > > *    trainingSamples,
int    classCount
 

Initialize a MahalanobisClassifier with the given set of training samples and number of classes.

No proximity measure is needed as the Mahalanobis distance is used in any case.


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.