latest version v1.9 - last update 10 Apr 2010 |
Parent class for all clustering validity measures. More...
#include <ltiClusteringValidity.h>
Public Member Functions | |
clusteringValidity () | |
clusteringValidity (const clusteringValidity &other) | |
virtual | ~clusteringValidity () |
virtual const char * | getTypeName () const |
clusteringValidity & | operator= (const clusteringValidity &other) |
clusteringValidity & | copy (const clusteringValidity &other) |
virtual bool | apply (const std::vector< dmatrix > &clusteredData, double &index, const dmatrix ¢roids) const =0 |
Protected Member Functions | |
double | getMinimumDistance (const dmatrix &m1, const dmatrix &m2) const |
double | getMaximumDistance (const dmatrix &m1, const dmatrix &m2) const |
double | getCentroidDistance (const dmatrix &m1, const dmatrix &m2) const |
double | getAverageDistance (const dmatrix &m1, const dmatrix &m2) const |
double | getAverageInterpointDistance (const dmatrix &m1, const dmatrix &m2) const |
double | getStandardDiameter (const dmatrix &m1) const |
double | getAverageDiameter (const dmatrix &m1) const |
double | getAverageToCentroidDiameter (const dmatrix &m1) const |
Parent class for all clustering validity measures.
Clustering validity measures are used to evaluate the quality of a clustering. The measure can e.a. be used to find the best possible number of clusters in a data set. It provides some distance and diameter measure for clusters. These measures are descriped in IEEE Transaction on systems,man and cybernetics - part B: cybernetics, Vol 28, No.3, June 1998, 301-315
lti::clusteringValidity::clusteringValidity | ( | ) |
default constructor
lti::clusteringValidity::clusteringValidity | ( | const clusteringValidity & | other | ) |
default constructor
virtual lti::clusteringValidity::~clusteringValidity | ( | ) | [virtual] |
destructor
virtual bool lti::clusteringValidity::apply | ( | const std::vector< dmatrix > & | clusteredData, | |
double & | index, | |||
const dmatrix & | centroids | |||
) | const [pure virtual] |
abstract parant class operates on the given parameter.
clusteredData | std::vector<dmatrix> with the source data. | |
index | the clustering validity result | |
centroids | dmatrix with each row representing a centroid of the corresponding distribution in clusteredData |
Implemented in lti::dunnIndex, lti::modHubertStat, lti::normModHubertStat, and lti::daviesBouldinIndex.
clusteringValidity& lti::clusteringValidity::copy | ( | const clusteringValidity & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
Reimplemented in lti::dunnIndex, lti::modHubertStat, lti::normModHubertStat, and lti::daviesBouldinIndex.
double lti::clusteringValidity::getAverageDiameter | ( | const dmatrix & | m1 | ) | const [protected] |
the average distance of all points in m1
double lti::clusteringValidity::getAverageDistance | ( | const dmatrix & | m1, | |
const dmatrix & | m2 | |||
) | const [protected] |
return the average distance of all the point in m1 and m2
double lti::clusteringValidity::getAverageToCentroidDiameter | ( | const dmatrix & | m1 | ) | const [protected] |
average distance between each point and the centroid of m1
double lti::clusteringValidity::getCentroidDistance | ( | const dmatrix & | m1, | |
const dmatrix & | m2 | |||
) | const [protected] |
return the distance of the centroids of m1 and m2
double lti::clusteringValidity::getMaximumDistance | ( | const dmatrix & | m1, | |
const dmatrix & | m2 | |||
) | const [protected] |
calculates the maximum distance of all the points in the given matrices and returns this distance
double lti::clusteringValidity::getMinimumDistance | ( | const dmatrix & | m1, | |
const dmatrix & | m2 | |||
) | const [protected] |
calculates the minimum distances of the points in the given matrices and returns it.
double lti::clusteringValidity::getStandardDiameter | ( | const dmatrix & | m1 | ) | const [protected] |
return the maximum distance of all points in m1
virtual const char* lti::clusteringValidity::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("clusteringValidity")
Reimplemented from lti::functor.
Reimplemented in lti::dunnIndex, lti::modHubertStat, lti::normModHubertStat, and lti::daviesBouldinIndex.
clusteringValidity& lti::clusteringValidity::operator= | ( | const clusteringValidity & | other | ) |
alias for copy member
other | the functor to be copied |
Reimplemented from lti::functor.
Reimplemented in lti::dunnIndex, lti::modHubertStat, lti::normModHubertStat, and lti::daviesBouldinIndex.