GClasses
GClasses::GAgglomerativeClusterer Class Reference

Detailed Description

This merges each cluster with its closest neighbor. (The distance between clusters is computed as the distance between the closest members of the clusters times (n^b), where n is the total number of points from both clusters, and b is a balancing factor.

#include <GCluster.h>

Inheritance diagram for GClasses::GAgglomerativeClusterer:
GClasses::GClusterer GClasses::GTransform

Public Member Functions

 GAgglomerativeClusterer (size_t nClusterCount)
 
virtual ~GAgglomerativeClusterer ()
 
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 GMatrixreduce (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 ()
 

Static Public Member Functions

static void test ()
 Performs unit tests for this class. Throws an exception if there is a failure. More...
 

Protected Attributes

size_t * m_pClusters
 
- Protected Attributes inherited from GClasses::GClusterer
size_t m_clusterCount
 
bool m_ownMetric
 
GDistanceMetricm_pMetric
 

Additional Inherited Members

- Protected Member Functions inherited from GClasses::GTransform
virtual GDomNodebaseDomNode (GDom *pDoc, const char *szClassName) const
 Child classes should use this in their implementation of serialize. More...
 

Constructor & Destructor Documentation

GClasses::GAgglomerativeClusterer::GAgglomerativeClusterer ( size_t  nClusterCount)
virtual GClasses::GAgglomerativeClusterer::~GAgglomerativeClusterer ( )
virtual

Member Function Documentation

virtual void GClasses::GAgglomerativeClusterer::cluster ( const GMatrix pData)
virtual

Performs clustering.

Implements GClasses::GClusterer.

static void GClasses::GAgglomerativeClusterer::test ( )
static

Performs unit tests for this class. Throws an exception if there is a failure.

virtual size_t GClasses::GAgglomerativeClusterer::whichCluster ( size_t  nVector)
virtual

Identifies the cluster of the specified row.

Implements GClasses::GClusterer.

Member Data Documentation

size_t* GClasses::GAgglomerativeClusterer::m_pClusters
protected