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

lti::centroidClustering Class Reference

Base class for all clustering methods that use centroids or prototypes for describing individual clusters. More...

#include <ltiCentroidClustering.h>

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

List of all members.

Public Member Functions

 centroidClustering ()
 centroidClustering (const centroidClustering &other)
virtual ~centroidClustering ()
virtual const char * getTypeName () const
centroidClusteringcopy (const centroidClustering &other)
const parametersgetParameters () const
virtual bool classify (const dvector &feature, outputVector &result) const
const dmatrixgetCentroids () const
virtual bool train (const dmatrix &input)=0
virtual bool train (const dmatrix &input, ivector &ids)
virtual bool write (ioHandler &handler, const bool complete=true) const
virtual bool read (ioHandler &handler, const bool complete=true)

Protected Attributes

dmatrix centroids

Detailed Description

Base class for all clustering methods that use centroids or prototypes for describing individual clusters.

A classify(const dvector&) method is implemented that should work for most subclasses.


Constructor & Destructor Documentation

lti::centroidClustering::centroidClustering (  ) 

default constructor

lti::centroidClustering::centroidClustering ( const centroidClustering other  ) 

copy constructor

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

destructor


Member Function Documentation

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

classifies a new data point.

This method can be used by all centroid classifiers if they properly initialize the classifier::output member. I.e. for each output unit the list of probabilities may contain only one entry with probability one and each id may be used only once.

Since the classifier::output expects a probability vector as result from the clustering method, the dissimilarity measure usually returned must be converted to a similarity measure. Here, this is done by first normalizing the vector of dissimilarities, then subtracting this vector from a vector filled with ones and, finally, normalizing the result. This operation yields similarity values between zero and one for arbitrary scales of the feature space. Information about possible reject cases is lost through the first normalizaton, though.

Parameters:
feature vector to be classified
result result as described above
Returns:
true if successful, false otherwise

Implements lti::unsupervisedClassifier.

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

copy data of "other" functor.

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

Reimplemented from lti::clustering.

Reimplemented in lti::adaptiveKMeans, lti::competitiveAgglomeration, lti::fuzzyCMeans, and lti::kMeansClustering.

const dmatrix& lti::centroidClustering::getCentroids (  )  const

Returns a const reference to the centroids of the clustering.

Returns:
const reference to the centroids
const parameters& lti::centroidClustering::getParameters (  )  const

returns used parameters

Reimplemented from lti::clustering.

Reimplemented in lti::adaptiveKMeans, lti::competitiveAgglomeration, lti::fuzzyCMeans, and lti::kMeansClustering.

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

returns the name of this type ("centroidClustering")

Reimplemented from lti::clustering.

Reimplemented in lti::adaptiveKMeans, lti::competitiveAgglomeration, lti::fuzzyCMeans, and lti::kMeansClustering.

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

read the rbf 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::centroidClustering::train ( const dmatrix input,
ivector ids 
) [virtual]
virtual bool lti::centroidClustering::train ( const dmatrix input  )  [pure virtual]

Declared so it wont be forgotten.

Implements lti::clustering.

Implemented in lti::adaptiveKMeans, lti::competitiveAgglomeration, lti::fuzzyCMeans, and lti::kMeansClustering.

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

write the rbf 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.


Member Data Documentation

returns current parameters.

(non const! -> protected) matrix containing the centroids formed by the clustering method


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

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