LTI-Lib latest version v1.9 - last update 24 Nov 2005
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

lti::mahalanobisDistOfSubset Class Reference

This class implements a cost function for evaluating a subset of features based on the mahalanobis distance. More...

#include <ltiMahalanobisDistOfSubset.h>

Inheritance diagram for lti::mahalanobisDistOfSubset:

Inheritance graph
[legend]
Collaboration diagram for lti::mahalanobisDistOfSubset:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 mahalanobisDistOfSubset ()
 mahalanobisDistOfSubset (const mahalanobisDistOfSubset &other)
virtual ~mahalanobisDistOfSubset ()
virtual const char * getTypeName () const
virtual void setSrc (const dmatrix &src, const ivector &srcIds)
virtual bool apply (const std::list< int > &in, double &value)
mahalanobisDistOfSubsetcopy (const mahalanobisDistOfSubset &other)
mahalanobisDistOfSubsetoperator= (const mahalanobisDistOfSubset &other)
virtual functorclone () const
const parameters & getParameters () const

Protected Attributes

list< dmatrixclusters

Detailed Description

This class implements a cost function for evaluating a subset of features based on the mahalanobis distance.

A great value of this cost function shows well seperated clusters. First, for all points in the data set the mahalanobis distance to each cluster in distribution is computed. Then the result of this costFunction is the average of all these distances. Before you can compute the cost function use the setSrc method to pass the complete data set with all features to this class. Later the features are accessed only by their column number.


Constructor & Destructor Documentation

lti::mahalanobisDistOfSubset::mahalanobisDistOfSubset  ) 
 

default constructor

lti::mahalanobisDistOfSubset::mahalanobisDistOfSubset const mahalanobisDistOfSubset other  ) 
 

copy constructor

Parameters:
other the object to be copied

virtual lti::mahalanobisDistOfSubset::~mahalanobisDistOfSubset  )  [virtual]
 

destructor


Member Function Documentation

virtual bool lti::mahalanobisDistOfSubset::apply const std::list< int > &  in,
double &  value
[virtual]
 

computes the mahalanobis distance with the given subset of features

Parameters:
value the result of the cost function.
in std::list with the features that should be inclueded for computing the function
Returns:
true if apply successful or false otherwise.

Implements lti::costFunction.

virtual functor* lti::mahalanobisDistOfSubset::clone  )  const [virtual]
 

returns a pointer to a clone of this functor.

Implements lti::functor.

mahalanobisDistOfSubset& lti::mahalanobisDistOfSubset::copy const mahalanobisDistOfSubset other  ) 
 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

const parameters& lti::mahalanobisDistOfSubset::getParameters  )  const
 

returns used parameters

Reimplemented from lti::functor.

virtual const char* lti::mahalanobisDistOfSubset::getTypeName  )  const [virtual]
 

returns the name of this type ("mahalanobisDistOfSubset")

Reimplemented from lti::costFunction.

mahalanobisDistOfSubset& lti::mahalanobisDistOfSubset::operator= const mahalanobisDistOfSubset other  ) 
 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

virtual void lti::mahalanobisDistOfSubset::setSrc const dmatrix src,
const ivector srcIds
[virtual]
 

Set the src data, that is used for computation.

This must be done before apply methods are called. Later each feature can be adressed by its column number, because usually a column represents a feature.

Reimplemented from lti::costFunction.


Member Data Documentation

list<dmatrix> lti::mahalanobisDistOfSubset::clusters [protected]
 

A list with each element containing a matrix with one cluster.

This list is build from the contructor.


The documentation for this class was generated from the following file:
Generated on Thu Nov 24 16:32:54 2005 for LTI-Lib by Doxygen 1.4.4