GClasses
|
An implementation of the K-medoids clustering algorithm.
#include <GCluster.h>
Public Member Functions | |
GKMedoids (size_t clusters) | |
virtual | ~GKMedoids () |
virtual void | cluster (const GMatrix *pData) |
Performs clustering. More... | |
virtual size_t | whichCluster (size_t nVector) |
Identifies the cluster of the specified row. More... | |
Public Member Functions inherited from GClasses::GClusterer | |
GClusterer (size_t nClusterCount) | |
virtual | ~GClusterer () |
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... | |
Public Member Functions inherited from GClasses::GTransform | |
GTransform () | |
GTransform (const GDomNode *pNode) | |
virtual | ~GTransform () |
Protected Member Functions | |
double | curErr (const GMatrix *pData) |
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... | |
Protected Attributes | |
double | m_d |
const GMatrix * | m_pData |
size_t * | m_pMedoids |
Protected Attributes inherited from GClasses::GClusterer | |
size_t | m_clusterCount |
bool | m_ownMetric |
GDistanceMetric * | m_pMetric |
GClasses::GKMedoids::GKMedoids | ( | size_t | clusters | ) |
|
virtual |
|
virtual |
Performs clustering.
Implements GClasses::GClusterer.
|
protected |
|
virtual |
Identifies the cluster of the specified row.
Implements GClasses::GClusterer.
|
protected |
|
protected |
|
protected |