|
GClasses
|
The base class for clustering algorithms. Classes that inherit from this class must implement a method named "cluster" which performs clustering, and a method named "whichCluster" which reports which cluster the specified row is determined to be a member of.
#include <GCluster.h>
Public Member Functions | |
| GClusterer (size_t nClusterCount) | |
| virtual | ~GClusterer () |
| virtual void | cluster (const GMatrix *pData)=0 |
| Performs clustering. More... | |
| size_t | clusterCount () |
| Return the number of clusters. More... | |
| virtual GMatrix * | reduce (const GMatrix &in) |
| Clusters pIn and outputs a dataset with one column that specifies the cluster number for each row. More... | |
| void | setMetric (GDistanceMetric *pMetric, bool own) |
| If own is true, then this object will delete pMetric when it is destroyed. More... | |
| virtual size_t | whichCluster (size_t nVector)=0 |
| Reports which cluster the specified row is a member of. More... | |
Public Member Functions inherited from GClasses::GTransform | |
| GTransform () | |
| GTransform (const GDomNode *pNode) | |
| virtual | ~GTransform () |
Protected Attributes | |
| size_t | m_clusterCount |
| bool | m_ownMetric |
| GDistanceMetric * | m_pMetric |
Additional Inherited Members | |
Protected Member Functions inherited from GClasses::GTransform | |
| virtual GDomNode * | baseDomNode (GDom *pDoc, const char *szClassName) const |
| Child classes should use this in their implementation of serialize. More... | |
| GClasses::GClusterer::GClusterer | ( | size_t | nClusterCount | ) |
|
virtual |
|
pure virtual |
Performs clustering.
Implemented in GClasses::GKMedoids, GClasses::GFuzzyKMeans, GClasses::GKMeans, and GClasses::GAgglomerativeClusterer.
|
inline |
Return the number of clusters.
Clusters pIn and outputs a dataset with one column that specifies the cluster number for each row.
Implements GClasses::GTransform.
| void GClasses::GClusterer::setMetric | ( | GDistanceMetric * | pMetric, |
| bool | own | ||
| ) |
If own is true, then this object will delete pMetric when it is destroyed.
|
pure virtual |
Reports which cluster the specified row is a member of.
Implemented in GClasses::GKMedoids, GClasses::GFuzzyKMeans, GClasses::GKMeans, and GClasses::GAgglomerativeClusterer.
|
protected |
|
protected |
|
protected |