OpenMS
CompleteLinkage Class Reference

CompleteLinkage ClusterMethod. More...

#include <OpenMS/ML/CLUSTERING/CompleteLinkage.h>

Inheritance diagram for CompleteLinkage:
[legend]
Collaboration diagram for CompleteLinkage:
[legend]

Public Member Functions

 CompleteLinkage ()
 default constructor More...
 
 CompleteLinkage (const CompleteLinkage &source)
 copy constructor More...
 
 ~CompleteLinkage () override
 destructor More...
 
CompleteLinkageoperator= (const CompleteLinkage &source)
 assignment operator More...
 
void operator() (DistanceMatrix< float > &original_distance, std::vector< BinaryTreeNode > &cluster_tree, const float threshold=1) const override
 clusters the indices according to their respective element distances More...
 
- Public Member Functions inherited from ClusterFunctor
 ClusterFunctor ()
 default constructor More...
 
 ClusterFunctor (const ClusterFunctor &source)
 copy constructor More...
 
virtual ~ClusterFunctor ()
 destructor More...
 
ClusterFunctoroperator= (const ClusterFunctor &source)
 assignment operator More...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
virtual ~ProgressLogger ()
 Destructor. More...
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor. More...
 
ProgressLoggeroperator= (const ProgressLogger &other)
 Assignment Operator. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void setLogger (ProgressLoggerImpl *logger)
 Sets the logger to be used for progress logging. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress (UInt64 bytes_processed=0) const
 
void nextProgress () const
 increment progress by 1 (according to range begin-end) More...
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD , GUI , NONE }
 Possible log types. More...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

CompleteLinkage ClusterMethod.

The details of the method can be found in: Backhaus, Erichson, Plinke, Weiber Multivariate Analysemethoden, Springer 2000 and Ellen M. Voorhees: Implementing agglomerative hierarchic clustering algorithms for use in document retrieval. Inf. Process. Manage. 22(6): 465-476 (1986)

See also
ClusterFunctor

Constructor & Destructor Documentation

◆ CompleteLinkage() [1/2]

default constructor

◆ CompleteLinkage() [2/2]

CompleteLinkage ( const CompleteLinkage source)

copy constructor

◆ ~CompleteLinkage()

~CompleteLinkage ( )
override

destructor

Member Function Documentation

◆ operator()()

void operator() ( DistanceMatrix< float > &  original_distance,
std::vector< BinaryTreeNode > &  cluster_tree,
const float  threshold = 1 
) const
overridevirtual

clusters the indices according to their respective element distances

Complete linkage updates the distances after merging two clusters using the maximal distance between the elements of their clusters. After threshold is exceeded, cluster_tree is filled with dummy clusteringsteps (children: (0,1), distance:-1) to the root.

Parameters
original_distanceContains the distances of the elements to be clustered, will be changed during clustering process, make sure to have a copy or be able to redo
cluster_treeRepresents the clustering, each node contains the next merged clusters (not element indices) and their distance, strict order is kept: left_child < right_child
thresholdThe minimal distance from which on cluster merging is considered unrealistic. By default set to 1, i.e. complete clustering until only one cluster remains
Exceptions
ClusterFunctor::InsufficientInputthrown if input is <2.
See also
ClusterFunctor , BinaryTreeNode

Implements ClusterFunctor.

◆ operator=()

CompleteLinkage& operator= ( const CompleteLinkage source)

assignment operator