latest version v1.9 - last update 10 Apr 2010 |
Abstract class, parent of all unsupervised classifiers. More...
#include <ltiUnsupervisedClassifier.h>
Classes | |
class | parameters |
the parameters for the class unsupervisedClassifier are the same as for classifier, except that the default value of mulipleMode is changed to outputTemplate::Ignore. More... | |
Public Member Functions | |
unsupervisedClassifier () | |
unsupervisedClassifier (const unsupervisedClassifier &other) | |
virtual const char * | getTypeName () const |
unsupervisedClassifier & | copy (const unsupervisedClassifier &other) |
const parameters & | getParameters () const |
virtual bool | train (const dmatrix &input)=0 |
virtual bool | train (const dmatrix &input, ivector &ids) |
virtual bool | classify (const dvector &feature, outputVector &result) const =0 |
Protected Member Functions | |
bool | selectRandomPoints (const dmatrix &data, int numberOfPoints, dmatrix &randomPoints) |
Abstract class, parent of all unsupervised classifiers.
This class defines the interface for all unsupervised train methods.
lti::unsupervisedClassifier::unsupervisedClassifier | ( | ) |
default constructor
lti::unsupervisedClassifier::unsupervisedClassifier | ( | const unsupervisedClassifier & | other | ) |
copy constructor
other | the object to be copied |
virtual bool lti::unsupervisedClassifier::classify | ( | const dvector & | feature, | |
outputVector & | result | |||
) | const [pure virtual] |
Classification.
Classifies the feature and returns the outputVector with the classification result.
feature | the vector to be classified | |
result | the result of the classification |
Implemented in lti::centroidClustering, lti::DBScan< T >, lti::MSTClustering< U >, lti::SOFM, and lti::SOFM2D.
unsupervisedClassifier& lti::unsupervisedClassifier::copy | ( | const unsupervisedClassifier & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::classifier.
Reimplemented in lti::adaptiveKMeans, lti::centroidClustering, lti::clustering, lti::competitiveAgglomeration, lti::DBScan< T >, lti::fuzzyCMeans, lti::kMeansClustering, lti::MSTClustering< U >, lti::SOFM, and lti::SOFM2D.
const parameters& lti::unsupervisedClassifier::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::classifier.
Reimplemented in lti::adaptiveKMeans, lti::centroidClustering, lti::clustering, lti::competitiveAgglomeration, lti::DBScan< T >, lti::fuzzyCMeans, lti::kMeansClustering, lti::MSTClustering< U >, lti::SOFM, and lti::SOFM2D.
virtual const char* lti::unsupervisedClassifier::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("unsupervisedClassifier")
Reimplemented from lti::classifier.
Reimplemented in lti::adaptiveKMeans, lti::centroidClustering, lti::clustering, lti::competitiveAgglomeration, lti::DBScan< T >, lti::fuzzyCMeans, lti::kMeansClustering, lti::MSTClustering< U >, lti::SOFM, and lti::SOFM2D.
bool lti::unsupervisedClassifier::selectRandomPoints | ( | const dmatrix & | data, | |
int | numberOfPoints, | |||
dmatrix & | randomPoints | |||
) | [protected] |
Randomly selects numberOfPoints points (rows) from the data matrix.
If nubmerOfPoints is greater than the number of points in data, points will be multiply selected.
data | contains points to select from in rows | |
numberOfPoints | number of points expected as result | |
randomPoints | the points randomly selected from data |
Unsupervised training.
The vectors in the input
matrix will be put into groups according to the training algorithm. Additionally, an integer indicating the class each point belongs to is returned.
By default this method uses the other train method (see train(const dmatrix&)) and then calls classifier::classify(const dvector&) to get the ids for each train-vector. These ids are then returned.
input | the matrix with the input vectors (each row is a training vector) | |
ids | vector of class ids for each input point |
Reimplemented in lti::adaptiveKMeans, lti::centroidClustering, lti::clustering, lti::competitiveAgglomeration, lti::DBScan< T >, lti::fuzzyCMeans, lti::kMeansClustering, lti::MSTClustering< U >, lti::SOFM, and lti::SOFM2D.
virtual bool lti::unsupervisedClassifier::train | ( | const dmatrix & | input | ) | [pure virtual] |
Unsupervised training.
The vectors in the input
matrix will be clustered using each specific method.
Implemented in lti::adaptiveKMeans, lti::centroidClustering, lti::clustering, lti::competitiveAgglomeration, lti::DBScan< T >, lti::fuzzyCMeans, lti::kMeansClustering, lti::MSTClustering< U >, lti::SOFM, and lti::SOFM2D.