LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::shClassifier Class Reference

Implements a sparse histogram-based classifier, such as the one described in B. More...

#include <ltiSHClassifier.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class shClassifier More...

Public Member Functions

 shClassifier ()
 shClassifier (const shClassifier &other)
virtual ~shClassifier ()
virtual const char * getTypeName () const
shClassifiercopy (const shClassifier &other)
shClassifieroperator= (const shClassifier &other)
virtual classifierclone () const
const parametersgetParameters () const
virtual bool train (const dmatrix &input, const ivector &ids)
virtual bool trainObject (const dmatrix &input, int &id)
virtual bool classify (const dvector &feature, outputVector &result) const
virtual bool write (ioHandler &handler, const bool complete=true) const
virtual bool read (ioHandler &handler, const bool complete=true)

Detailed Description

Implements a sparse histogram-based classifier, such as the one described in B.

Schiele, J. L. Crowley: Recognition without Correspondence using Multidimensional Receptive Field Histograms.


Constructor & Destructor Documentation

lti::shClassifier::shClassifier (  ) 

default constructor

lti::shClassifier::shClassifier ( const shClassifier other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::shClassifier::~shClassifier (  )  [virtual]

destructor


Member Function Documentation

virtual bool lti::shClassifier::classify ( const dvector feature,
outputVector result 
) const [virtual]

Classification.

Classifies the feature and returns the outputVector object with the classification result.

NOTE: This method is NOT really const. Although the main members of the shClassifier are not changed some state variables used for efficiency are. Thus, it is not save to use the same instance of the shClassifier in two different threads.

Parameters:
feature pattern to be classified
result of the classifications as a classifier::outputVector
Returns:
true if the classification has been successful

Implements lti::supervisedInstanceClassifier.

virtual classifier* lti::shClassifier::clone (  )  const [virtual]

returns a pointer to a clone of this clustering.

Implements lti::classifier.

shClassifier& lti::shClassifier::copy ( const shClassifier other  ) 

copy data of "other" clustering.

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

Reimplemented from lti::supervisedInstanceClassifier.

const parameters& lti::shClassifier::getParameters (  )  const

returns used parameters

Reimplemented from lti::supervisedInstanceClassifier.

virtual const char* lti::shClassifier::getTypeName (  )  const [virtual]

returns the name of this type ("shClassifier")

Reimplemented from lti::supervisedInstanceClassifier.

shClassifier& lti::shClassifier::operator= ( const shClassifier other  ) 

alias for copy member

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

Reimplemented from lti::supervisedInstanceClassifier.

virtual bool lti::shClassifier::read ( ioHandler handler,
const bool  complete = true 
) [virtual]

read the classifier from the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::classifier.

virtual bool lti::shClassifier::train ( const dmatrix input,
const ivector ids 
) [virtual]

Supervised training.

The vectors in the input matrix are arranged row-wise, i.e. each row contains one data vector. The ids vector contains the class label for each row. This functor implements the SMO algorithm by J.C. Platt. All classes are modeled using the same kernel function, given in the parameters object.

Parameters:
input the matrix with the input vectors (each row is a training vector)
ids vector of class ids for each input point
Returns:
true if successful, false otherwise. (if false you can check the error message with getStatusString())

Implements lti::supervisedInstanceClassifier.

virtual bool lti::shClassifier::trainObject ( const dmatrix input,
int &  id 
) [virtual]

Adds an object to this classifier.

The id is given automatically and returned in the parameter.

virtual bool lti::shClassifier::write ( ioHandler handler,
const bool  complete = true 
) const [virtual]

write the classifier in the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::classifier.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:26:58 2010 for LTI-Lib by Doxygen 1.6.1