MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
#include <mdsFuzzyCMeans.h>
Public Types | |
enum | { NO_ITERATOR_IS_DECLARED_FOR_TEMPLATE_PARAMETER = C::ITERATOR_DECLARED } |
Check that C has an iterator declared. More... | |
enum | { NUM_OF_DIMENSIONS = N } |
Dimensionality of input data. More... | |
typedef CStaticVector< double, N > | tCluster |
Vector representing one cluster. | |
typedef C::tConstIterator | tConstIterator |
Container iterator type. | |
typedef C | tContainer |
Container type. | |
typedef tConstIterator::tItem | tItem |
Container item. | |
typedef CVector< double > | tVector |
Used internal vector type. | |
Public Member Functions | |
CHasOptions & | addOption (int Flag) |
Adds a given flag using bitwise OR operation. | |
CFuzzyCMeans (int Flags=FuzzyCMeans::DEFAULT_FLAGS) | |
Default constructor. | |
bool | checkAllOptions (int Flags) const |
Checks if all specified flags are set. | |
bool | checkAnyOption (int Flags) const |
Checks if any of specified flags is set. | |
int | checkOption (int Flag) const |
Checks if a single flag is set. | |
CHasOptions & | clearOption (int Flag) |
Removes a given flag. | |
bool | execute (const tContainer &Input) |
Clustering of a given set of numbers or vectors. | |
bool | execute (const tContainer &Input, tSize NumOfClusters) |
Clustering of a given set of numbers or vectors. | |
bool | getCluster (tSize i, tCluster &Cluster) |
Returns center of the i-th cluster. | |
bool | getMembership (tSize i, tVector &Membership) |
Returns soft membership function of the i-th input sample. | |
tSize | getMembership (tSize i) |
Returns index of the cluster into which the i-th input vector was classified (hard membership function). | |
tSize | getNumOfClusters () const |
Returns the number of clusters. | |
tSize | getNumOfDimensions () const |
Returns the number od dimensions. | |
int | getOptions () const |
Returns all flags. | |
CHasOptions & | setOption (int Flag) |
Adds a given flag using bitwise OR operation. | |
CHasOptions & | setOptions (int Flags) |
Sets complete flags. | |
CFuzzyCMeans & | setWeight (double dWeight) |
Changes the weighting factor. | |
virtual | ~CFuzzyCMeans () |
Virtual destructor. | |
Protected Types | |
typedef CMatrix< double > | tMatrix |
Used internal matrix type. | |
Protected Member Functions | |
bool | checkMembership () |
Checks if the membership matrix is O.K. | |
double | computeDunnCoefficient () |
Computes the Dunn's partitions coefficient. | |
double | getMembership (const tItem &Sample, tSize i) |
Returns membership of a given sample in i-th cluster. | |
void | initMembership () |
Randomly initializes the membership matrix. | |
void | iterateFCM (const tContainer &Input, double dMinChange) |
Iterates FCM. | |
void | recomputeClusterCenters (const tContainer &Input) |
Compute new positions of cluster centers. | |
void | recomputeMembership (const tContainer &Input) |
Re-computes membership for every sample. | |
double | recomputeObjectiveFunction (const tContainer &Input) |
Returns value of the objective function. | |
void | recomputePowers () |
Re-computes matrix of powers of the membership function. | |
Protected Attributes | |
tMatrix | m_Clusters |
Cluster centers. | |
double | m_dExponent |
Helper variables. | |
double | m_dWeight |
Weighting factor. | |
tMatrix | m_Membership |
Membership matrix. | |
int | m_Options |
Optional flags. | |
tMatrix | m_Powers |
Helper matrix. | |
CUniformPRNG | m_Uniform |
Uniform random number generator. |
typedef CStaticVector<double,N> mds::math::CFuzzyCMeans< C, N >::tCluster |
Vector representing one cluster.
typedef C::tConstIterator mds::math::CFuzzyCMeans< C, N >::tConstIterator |
Container iterator type.
typedef C mds::math::CFuzzyCMeans< C, N >::tContainer |
Container type.
typedef tConstIterator::tItem mds::math::CFuzzyCMeans< C, N >::tItem |
Container item.
typedef CMatrix<double> mds::math::CFuzzyCMeans< C, N >::tMatrix [protected] |
Used internal matrix type.
typedef CVector<double> mds::math::CFuzzyCMeans< C, N >::tVector |
Used internal vector type.
anonymous enum |
anonymous enum |
CFuzzyCMeans::CFuzzyCMeans | ( | int | Flags = FuzzyCMeans::DEFAULT_FLAGS | ) |
Default constructor.
virtual mds::math::CFuzzyCMeans< C, N >::~CFuzzyCMeans | ( | ) | [virtual] |
Virtual destructor.
CHasOptions& mds::base::CHasOptions::addOption | ( | int | Flag | ) | [inherited] |
Adds a given flag using bitwise OR operation.
bool mds::base::CHasOptions::checkAllOptions | ( | int | Flags | ) | const [inherited] |
Checks if all specified flags are set.
bool mds::base::CHasOptions::checkAnyOption | ( | int | Flags | ) | const [inherited] |
Checks if any of specified flags is set.
bool CFuzzyCMeans::checkMembership | ( | ) | [protected] |
Checks if the membership matrix is O.K.
int mds::base::CHasOptions::checkOption | ( | int | Flag | ) | const [inherited] |
Checks if a single flag is set.
CHasOptions& mds::base::CHasOptions::clearOption | ( | int | Flag | ) | [inherited] |
Removes a given flag.
double CFuzzyCMeans::computeDunnCoefficient | ( | ) | [protected] |
Computes the Dunn's partitions coefficient.
bool CFuzzyCMeans::execute | ( | const tContainer & | Input | ) |
Clustering of a given set of numbers or vectors.
bool CFuzzyCMeans::execute | ( | const tContainer & | Input, |
tSize | NumOfClusters | ||
) |
Clustering of a given set of numbers or vectors.
bool CFuzzyCMeans::getCluster | ( | tSize | i, |
tCluster & | Cluster | ||
) |
Returns center of the i-th cluster.
bool CFuzzyCMeans::getMembership | ( | tSize | i, |
tVector & | Membership | ||
) |
Returns soft membership function of the i-th input sample.
tSize CFuzzyCMeans::getMembership | ( | tSize | i | ) |
Returns index of the cluster into which the i-th input vector was classified (hard membership function).
double CFuzzyCMeans::getMembership | ( | const tItem & | Sample, |
tSize | i | ||
) | [protected] |
Returns membership of a given sample in i-th cluster.
tSize mds::math::CFuzzyCMeans< C, N >::getNumOfClusters | ( | ) | const |
Returns the number of clusters.
tSize mds::math::CFuzzyCMeans< C, N >::getNumOfDimensions | ( | ) | const |
Returns the number od dimensions.
int mds::base::CHasOptions::getOptions | ( | ) | const [inherited] |
Returns all flags.
void CFuzzyCMeans::initMembership | ( | ) | [protected] |
Randomly initializes the membership matrix.
void CFuzzyCMeans::iterateFCM | ( | const tContainer & | Input, |
double | dMinChange | ||
) | [protected] |
Iterates FCM.
void CFuzzyCMeans::recomputeClusterCenters | ( | const tContainer & | Input | ) | [protected] |
Compute new positions of cluster centers.
void CFuzzyCMeans::recomputeMembership | ( | const tContainer & | Input | ) | [protected] |
Re-computes membership for every sample.
double CFuzzyCMeans::recomputeObjectiveFunction | ( | const tContainer & | Input | ) | [protected] |
Returns value of the objective function.
void CFuzzyCMeans::recomputePowers | ( | ) | [protected] |
Re-computes matrix of powers of the membership function.
CHasOptions& mds::base::CHasOptions::setOption | ( | int | Flag | ) | [inherited] |
Adds a given flag using bitwise OR operation.
CHasOptions& mds::base::CHasOptions::setOptions | ( | int | Flags | ) | [inherited] |
Sets complete flags.
CFuzzyCMeans< C, N > & CFuzzyCMeans::setWeight | ( | double | dWeight | ) |
Changes the weighting factor.
tMatrix mds::math::CFuzzyCMeans< C, N >::m_Clusters [protected] |
Cluster centers.
double mds::math::CFuzzyCMeans< C, N >::m_dExponent [protected] |
Helper variables.
double mds::math::CFuzzyCMeans< C, N >::m_dWeight [protected] |
Weighting factor.
tMatrix mds::math::CFuzzyCMeans< C, N >::m_Membership [protected] |
Membership matrix.
int mds::base::CHasOptions::m_Options [protected, inherited] |
Optional flags.
tMatrix mds::math::CFuzzyCMeans< C, N >::m_Powers [protected] |
Helper matrix.
CUniformPRNG mds::math::CFuzzyCMeans< C, N >::m_Uniform [protected] |
Uniform random number generator.