Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::HistogramIntersection< T > Class Template Reference

#include <ProximityMeasure.h>

Inheritance diagram for prapi::HistogramIntersection< T >:

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

Detailed Description

template<class T = int>
class prapi::HistogramIntersection< T >

Histogram intersection calculates the intersection between two feature distributions.

The result of this measure is HI = 1-sumi=1..N(min(Si,Mi)), where S and M represent the sample and model distributions, respectively. N is the length of the distributions.


Public Methods

 HistogramIntersection ()
 Construct a new HistogramIntersection proximity measure.

void setNormalized (bool normalize)
 Set the normalized state.

bool isNormalized (void)
 Get the normalize state.

double getProximity (const util::List< T > &sample, const util::List< T > &model, double stopAfter=MAXDOUBLE) const throw (ProximityException&)
 Proximity between two lists.


Constructor & Destructor Documentation

template<class T = int>
prapi::HistogramIntersection< T >::HistogramIntersection   [inline]
 

Construct a new HistogramIntersection proximity measure.

The measure is normalized by default.


Member Function Documentation

template<class T>
double prapi::HistogramIntersection< T >::getProximity const util::List< T > &    sample,
const util::List< T > &    model,
double    stopAfter = MAXDOUBLE
const throw (ProximityException&) [virtual]
 

Proximity between two lists.

Parameters:
sample  the list to be classified
model  the model
stopAfter  A value that can be used in optimizing the performance of a proximity measure. Classifiers may set this value to inform the proximity measure to stop if it notices the proximity will be over a certain value. For example, the kNN classifier sets this value to the kth smallest proximity so far. If a sample is not closer than that, then it makes no sense to inspect it any more.

Implements prapi::ProximityMeasure< T >.

template<class T = int>
void prapi::HistogramIntersection< T >::setNormalized bool    normalize [inline]
 

Set the normalized state.

If true, then all feature vectors given to this proximity measure are normalized prior to calculating the proximity. If false, then the feature vectors are assumed to be normalized a priori. In the latter case, the computational performance of the measure will be significantly higher. The default value is true.


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.