OpenMS  2.7.0
Classes | Functions
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)
 clustering function for binned PeakSpectrum More...
 

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 
)
inline

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 also
BinnedSpectrumCompareFunctor can be applied.
Parameters
datavector of PeakSpectrum s to be clustered
comparatora BinnedSpectrumCompareFunctor
szthe desired binsize for the BinnedSpectrum s
spthe desired binspread for the BinnedSpectrum s
offsetthe desired bins offset for the BinnedSpectrum s
clusterera clustermethod implementation, base class ClusterFunctor
cluster_treethe vector that will hold the BinaryTreeNodes representing the clustering (for further investigation with the ClusterAnalyzer methods)
original_distancethe DistanceMatrix holding the pairwise distances of the elements in data, will be made newly if given size does not fit to the number of elements given in data
See also
ClusterFunctor, BinaryTreeNode, ClusterAnalyzer, BinnedSpectrum, BinnedSpectrumCompareFunctor

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