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. More...
#include <GCluster.h>
Public Member Functions | |
GClusterer (size_t nClusterCount) | |
virtual | ~GClusterer () |
void | setMetric (GDistanceMetric *pMetric, bool own) |
If own is true, then this object will delete pMetric when it is destroyed. | |
size_t | clusterCount () |
Return the number of clusters. | |
virtual GMatrix * | doit (GMatrix &in) |
Clusters pIn and outputs a dataset with one column that specifies the cluster number for each row. | |
virtual void | cluster (GMatrix *pData)=0 |
Performs clustering. | |
virtual size_t | whichCluster (size_t nVector)=0 |
Reports which cluster the specified row is a member of. | |
Protected Attributes | |
size_t | m_clusterCount |
GDistanceMetric * | m_pMetric |
bool | m_ownMetric |
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.
GClasses::GClusterer::GClusterer | ( | size_t | nClusterCount | ) |
virtual GClasses::GClusterer::~GClusterer | ( | ) | [virtual] |
virtual void GClasses::GClusterer::cluster | ( | GMatrix * | pData | ) | [pure virtual] |
Performs clustering.
Implemented in GClasses::GAgglomerativeClusterer, GClasses::GKMeans, GClasses::GFuzzyKMeans, and GClasses::GKMedoids.
size_t GClasses::GClusterer::clusterCount | ( | ) | [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.
virtual size_t GClasses::GClusterer::whichCluster | ( | size_t | nVector | ) | [pure virtual] |
Reports which cluster the specified row is a member of.
Implemented in GClasses::GAgglomerativeClusterer, GClasses::GKMeans, GClasses::GFuzzyKMeans, and GClasses::GKMedoids.
size_t GClasses::GClusterer::m_clusterCount [protected] |
bool GClasses::GClusterer::m_ownMetric [protected] |
GDistanceMetric* GClasses::GClusterer::m_pMetric [protected] |