Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::MultiFeatureProximity< T > Class Template Reference

#include <MultiFeature.h>

Inheritance diagram for prapi::MultiFeatureProximity< T >:

prapi::ProximityMeasure< List< T > > Object List of all members.

Detailed Description

template<class T>
class prapi::MultiFeatureProximity< T >

MultifeatureProximity provides convenient means to combine different features in classification.

It is able to calculate proximities between multi-feature samples using different measures for different feature vectors. A multi-feature sample is a sample whose feature vector is a list of feature vectors. Each 'feature' in the sample may thus represent a distribution or any other type of a feature vector. A different proximity measure may be provided for each of these vectors, and combining the results given by the measures can be performed in any way by writing a custom ProximityCombiner.

Example:

 MyProximity meas1, meas2;
 List<ProximityMeasure<double> > lst;
 lst += &meas1;
 lst += &meas2;

 //Autodelete combiner upon the deletion of the MultiFeatureProximity
 MultiFeatureProximity mfpm(lst,new ProximityCombiner::Minimum);
 //No autodelete
 ProximityCombiner::Minimum min;
 MultiFeatureProximity mfpm2(lst,min);
 

See also:
ProximityMatrix


Public Methods

 MultiFeatureProximity ()
 Default constructor which does not do anything.

 MultiFeatureProximity (List< ProximityMeasure< T > * > &measures, ProximityCombiner *combiner)
 Create a new multi-feature proximity measure.

 MultiFeatureProximity (List< ProximityMeasure< T > * > &measures, ProximityCombiner &combiner)
 Create a new multi-feature proximity measure.

 MultiFeatureProximity (const MultiFeatureProximity &other)
 Create a copy of another multifeature proximity measure.

double getProximity (const List< List< T > > &lst, const List< List< T > > &model, double stopAfter=MAXDOUBLE) const throw (ProximityException&)
void setFeaturesEnabled (bool enabled)
 Enable or disable all features/proximities.

void setFeatureEnabled (int index, bool enabled)
 Enable or disable a given feature/proximity.

bool isFeatureEnabled (int index)
 Check whether a feature/proximity is enabled.

bool isSymmetric (void)
 See whether this measure is symmetric.

int getFeatureCount (void)
 Tells how many feature vectors are used by this MultiFeatureProximity.

MultiFeatureProximity & operator= (const MultiFeatureProximity &other)
 Copy the contents of another MultiFeatureProximity.


Constructor & Destructor Documentation

template<class T>
prapi::MultiFeatureProximity< T >::MultiFeatureProximity List< ProximityMeasure< T > * > &    measures,
ProximityCombiner   combiner
 

Create a new multi-feature proximity measure.

Note that the memory pointed to by combiner is automatically released.

Parameters:
measures  a list of proximity measure pointers that are to be used in measuring the proximities between the corresponding feature vectors. The length of this list must be equal to the length of each feature vector list in the samples to be classified.
combiner  a class that combines the proximities obtained from the proximity measures to a single proximity value.

template<class T>
prapi::MultiFeatureProximity< T >::MultiFeatureProximity List< ProximityMeasure< T > * > &    measures,
ProximityCombiner   combiner
 

Create a new multi-feature proximity measure.

Parameters:
measures  a list of proximity measure pointers that are to be used in measuring the proximities between the corresponding feature vectors. The length of this list must be equal to the length of each feature vector list in the samples to be classified.
combiner  a class that combines the proximities obtained from the proximity measures to a single proximity value.


Member Function Documentation

template<class T>
int prapi::MultiFeatureProximity< T >::getFeatureCount void    [inline]
 

Tells how many feature vectors are used by this MultiFeatureProximity.

Returns:
number of featureVectors

template<class T>
bool prapi::MultiFeatureProximity< T >::isFeatureEnabled int    index [inline]
 

Check whether a feature/proximity is enabled.

Parameters:
index  the index of the feature
Returns:
true if and only if the feature is enabled

template<class T>
bool prapi::MultiFeatureProximity< T >::isSymmetric void   
 

See whether this measure is symmetric.

A multi-feature proximity is symmetric if all of its enabled internal proximities are symmetric or there are no enabled proximities.

Reimplemented from prapi::ProximityMeasure< List< T > >.

template<class T>
void prapi::MultiFeatureProximity< T >::setFeatureEnabled int    index,
bool    enabled
 

Enable or disable a given feature/proximity.

Parameters:
index  the index of the feature to be enabled/disabled
enabled  if false, the feature at index will not be taken into account when calculating proximities. The length of the list of proximity values given to ProximityCombiner equals to the number of enabled features.

template<class T>
void prapi::MultiFeatureProximity< T >::setFeaturesEnabled bool    enabled [inline]
 

Enable or disable all features/proximities.

See also:
setFeatureEnabled(int,bool)


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.