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

lti::classifier Class Reference

Abstract parent class for all classifiers. More...

#include <ltiClassifier.h>

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

List of all members.

Classes

class  invalidMethodException
 Exception thrown when a method of a functor is not implemented for a specific parameter set. More...
class  invalidOutputException
 Exception thrown when the output objects has not been set yet. More...
class  invalidParametersException
 Exception thrown when the parameters are not set. More...
class  outputTemplate
 The outputTemplate stores the relation between the different positions (sometimes called internal ids) of a classification result and the ids. More...
class  outputVector
 An output vector is the result of classifying data with any classifier. More...
class  parameters
 the parameters for the class classifier More...
class  parametersOutOfRangeException
 Exception thrown when a parameter is out of range. More...

Public Member Functions

 classifier ()
 classifier (const classifier &other)
virtual ~classifier ()
virtual const char * getTypeName () const
classifiercopy (const classifier &other)
classifieroperator= (const classifier &other)
virtual classifierclone () const =0
virtual bool validParameters () const
const parametersgetParameters () const
virtual bool setParameters (const parameters &theParam)
virtual void setOutputTemplate (const outputTemplate &theOutputTemplate)
const outputTemplategetOutputTemplate () const
virtual bool write (ioHandler &handler, const bool complete=true) const
virtual bool read (ioHandler &handler, const bool complete=true)
Progress Info

Methods used to plug-in and retrieve progress visualization objects.



void setProgressObject (const progressInfo &progBox)
void removeProgressObject ()
bool validProgressObject () const
progressInfogetProgressObject ()
const progressInfogetProgressObject () const

Static Public Attributes

static const int unknownObj
static const int noObject
static const double nullProbability

Protected Attributes

parametersparams
progressInfoprogressBox
outputTemplate outTemplate

Detailed Description

Abstract parent class for all classifiers.

The classifier class encloses a number of other important classes:

lti::classifier::parameters
similar to the functor::parameters, this is used to specify the characteristics of a classifier like learning rate, etc.
lti::classifier::outputVector
This type is used to return the classification results.
lti::classifier::outputTemplate
Contains information on how the outputVector is to be constructed from a resulting vector of the classification.

Classifiers can be diveded into two large groups: supervised and unsupervised. These two groups have the base classes supervisedClassifier and unsupervisedClassifier which are subclasses of this class. Examples for the first type are RBF networks, multi layer perceptron, maximum likelihood classifiers etc. The second type comprises statistic and neural clustering methods.

All classifiers return an outputVector when classify is called. The outputVector is created by the classifier by applying its outputTemplate to the regular dvector which results from the classification process.


Constructor & Destructor Documentation

lti::classifier::classifier (  ) 

default constructor

lti::classifier::classifier ( const classifier other  ) 

copy constructor

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

destructor


Member Function Documentation

virtual classifier* lti::classifier::clone (  )  const [pure virtual]
classifier& lti::classifier::copy ( const classifier other  ) 

return the last message set with setStatusString().

This will never return 0. If no status-string has been set yet an empty string (pointer to a string with only the char(0)) will be returned. set a status string.

Parameters:
msg the const string to be reported next time by getStatusString(). The given string will be copied This message will be usually set within the apply methods to indicate an error cause.

Note that the change of the status string is not considered as a change in the functor status. copy data of "other" functor.

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

Reimplemented from lti::ioObject.

Reimplemented in lti::adaptiveKMeans, lti::bagging, lti::centroidClustering, lti::clustering, lti::competitiveAgglomeration, lti::crispDecisionTree, lti::DBScan< T >, lti::decisionTree, lti::fuzzyCMeans, lti::hmmClassifier, lti::hmmOnlineClassifier, lti::kMeansClustering, lti::kNNClassifier, lti::lvq, lti::manualCrispDecisionTree, lti::MLP, lti::MSTClustering< U >, lti::rbf, lti::shClassifier, lti::SOFM, lti::SOFM2D, lti::supervisedInstanceClassifier, lti::supervisedSequenceClassifier, lti::svm, and lti::unsupervisedClassifier.

Referenced by operator=().

const outputTemplate& lti::classifier::getOutputTemplate (  )  const

get a const reference to the outputTemplate

Referenced by lti::kNNClassifier::getColumnId().

const parameters& lti::classifier::getParameters (  )  const
const progressInfo& lti::classifier::getProgressObject (  )  const

get progress object

progressInfo& lti::classifier::getProgressObject (  ) 

get progress object

virtual const char* lti::classifier::getTypeName (  )  const [virtual]
classifier& lti::classifier::operator= ( const classifier other  )  [inline]
virtual bool lti::classifier::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::ioObject.

Reimplemented in lti::bagging, lti::centroidClustering, lti::crispDecisionTree, lti::decisionTree, lti::hmmClassifier, lti::hmmOnlineClassifier, lti::kNNClassifier, lti::MLP, lti::MSTClustering< U >, lti::rbf, lti::shClassifier, lti::SOFM, lti::SOFM2D, and lti::svm.

void lti::classifier::removeProgressObject (  ) 

remove the active progress object

virtual void lti::classifier::setOutputTemplate ( const outputTemplate theOutputTemplate  )  [virtual]

sets the classifier's outputTemplate This member makes a copy of theOutputTemplate: the classifier will keep its own copy of the outputTemplate

virtual bool lti::classifier::setParameters ( const parameters theParam  )  [virtual]

sets the classifier's parameters.

This member makes a copy of theParam: the classifier will keep its own copy of the parameters!

Reimplemented in lti::fuzzyCMeans.

void lti::classifier::setProgressObject ( const progressInfo progBox  ) 

set a progress object

A clone of the given object will be generated.

virtual bool lti::classifier::validParameters (  )  const [inline, virtual]

returns true if the parameters are valid

References params.

bool lti::classifier::validProgressObject (  )  const

return true if a valid progressInfo object has already been setted

virtual bool lti::classifier::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::ioObject.

Reimplemented in lti::bagging, lti::centroidClustering, lti::crispDecisionTree, lti::decisionTree, lti::hmmClassifier, lti::hmmOnlineClassifier, lti::kNNClassifier, lti::MLP, lti::MSTClustering< U >, lti::rbf, lti::shClassifier, lti::SOFM, lti::SOFM2D, and lti::svm.


Member Data Documentation

const int lti::classifier::noObject [static]

constant to indicate "no object"

const double lti::classifier::nullProbability [static]

all probabilities under this value will be considered as 0

the status string written with setStatusString

the empty string returned if the statusString is empty The outputTemplate for this classifier

returns current parameters.

(non const! -> protected) current parameters.

Referenced by validParameters().

current progress object

const int lti::classifier::unknownObj [static]

constant to indicate an unknown object


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

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