OpenMS
Clustering

This class contains SpectraClustering classes These classes are components for clustering all kinds of data for which a distance relation, normalizable in the range of [0,1], is available. Mainly this will be data for which there is a corresponding CompareFunctor given (e.g. PeakSpectrum) that is yielding the similarity normalized in the range of [0,1] of such two elements, so it can easily converted to the needed distances. More...

Collaboration diagram for Clustering:

Classes

class  AverageLinkage
 AverageLinkage ClusterMethod. More...
 
class  ClusterAnalyzer
 Bundles analyzing tools for a clustering (given as sequence of BinaryTreeNode's) More...
 
class  ClusterFunctor
 Base class for cluster functors. More...
 
class  ClusterHierarchical
 Hierarchical clustering with generic clustering functions. More...
 
class  CompleteLinkage
 CompleteLinkage ClusterMethod. More...
 
class  SingleLinkage
 SingleLinkage ClusterMethod. More...
 

Functions

void cluster (std::vector< PeakSpectrum > &data, const BinnedSpectrumCompareFunctor &comparator, double sz, UInt sp, float offset, const ClusterFunctor &clusterer, std::vector< BinaryTreeNode > &cluster_tree, DistanceMatrix< float > &original_distance) const
 

Detailed Description

This class contains SpectraClustering classes These classes are components for clustering all kinds of data for which a distance relation, normalizable in the range of [0,1], is available. Mainly this will be data for which there is a corresponding CompareFunctor given (e.g. PeakSpectrum) that is yielding the similarity normalized in the range of [0,1] of such two elements, so it can easily converted to the needed distances.

See also
PeakSpectrumCompareFunctor.

Function Documentation

◆ cluster()

void cluster ( std::vector< PeakSpectrum > &  data,
const BinnedSpectrumCompareFunctor comparator,
double  sz,
UInt  sp,
float  offset,
const ClusterFunctor clusterer,
std::vector< BinaryTreeNode > &  cluster_tree,
DistanceMatrix< float > &  original_distance 
) const
inline
@brief clustering function for binned PeakSpectrum

A version of the clustering function for PeakSpectra employing binned similarity methods. From the given PeakSpectrum BinnedSpectrum are generated, so the similarity functor @see BinnedSpectrumCompareFunctor can be applied.

@param data vector of @ref PeakSpectrum s to be clustered
@param comparator a BinnedSpectrumCompareFunctor
@param sz the desired binsize for the @ref BinnedSpectrum s
@param sp the desired binspread for the @ref BinnedSpectrum s
@param offset the desired bins offset for the @ref BinnedSpectrum s
@param clusterer a clustermethod implementation, base class ClusterFunctor
@param cluster_tree the vector that will hold the BinaryTreeNodes representing the clustering (for further investigation with the ClusterAnalyzer methods)
@param original_distance the DistanceMatrix holding the pairwise distances of the elements in @p data, will be made newly if given size does not fit to the number of elements given in @p data
@see ClusterFunctor, BinaryTreeNode, ClusterAnalyzer, BinnedSpectrum, BinnedSpectrumCompareFunctor

References DistanceMatrix< Value >::clear(), DistanceMatrix< Value >::resize(), and DistanceMatrix< Value >::setValue().