latest version v1.9 - last update 10 Apr 2010 |
this class implements the fuzzy C Means clustering algorithm. More...
#include <ltiFuzzyCMeans.h>
Classes | |
class | parameters |
the parameters for the class fuzzyCMeans More... | |
Public Member Functions | |
fuzzyCMeans () | |
fuzzyCMeans (const fuzzyCMeans &other) | |
virtual | ~fuzzyCMeans () |
virtual const char * | getTypeName () const |
fuzzyCMeans & | copy (const fuzzyCMeans &other) |
fuzzyCMeans & | operator= (const fuzzyCMeans &other) |
virtual classifier * | clone () const |
const parameters & | getParameters () const |
bool | setParameters (const classifier::parameters &theParams) |
virtual bool | train (const dmatrix &input, ivector &ids) |
virtual bool | train (const dmatrix &input) |
this class implements the fuzzy C Means clustering algorithm.
the class arbitrary picks a given number of points as centroids. Between these centroids and the given points is a degree of membership calculated. According to these memberships new centroids are calculated. This is done until the convergence criterion is met.
The convergence criterion could be either the the maximum number of allowed iterations or the distance between the matrix of centroids of the last two iterations the classify method is not implemented, instead the classify method of superclass is used which does not regard the memberships of the points to the centroids
lti::fuzzyCMeans::fuzzyCMeans | ( | ) |
default constructor
lti::fuzzyCMeans::fuzzyCMeans | ( | const fuzzyCMeans & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::fuzzyCMeans::~fuzzyCMeans | ( | ) | [virtual] |
destructor
virtual classifier* lti::fuzzyCMeans::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this clustering.
Implements lti::classifier.
fuzzyCMeans& lti::fuzzyCMeans::copy | ( | const fuzzyCMeans & | other | ) |
copy data of "other" clustering.
other | the clustering to be copied |
Reimplemented from lti::centroidClustering.
const parameters& lti::fuzzyCMeans::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::centroidClustering.
virtual const char* lti::fuzzyCMeans::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("fuzzyCMeans")
Reimplemented from lti::centroidClustering.
fuzzyCMeans& lti::fuzzyCMeans::operator= | ( | const fuzzyCMeans & | other | ) |
alias for copy member
other | the clustering to be copied |
Reimplemented from lti::classifier.
bool lti::fuzzyCMeans::setParameters | ( | const classifier::parameters & | theParams | ) | [virtual] |
set the parameters of the classifier, calls setParameters of the superclass and tests if the parameter norm is valid.
If not a status string is set.
Reimplemented from lti::classifier.
virtual bool lti::fuzzyCMeans::train | ( | const dmatrix & | input | ) | [virtual] |
Unsupervised training.
The vectors in the input
matrix will be clustered using each specific method.
Implements lti::centroidClustering.
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 train(const dmatrix&) and then calls classify(const dvector&) to get the ids for each trainvector. 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 from lti::centroidClustering.