IMP  2.0.0
The Integrative Modeling Platform
point_clustering.h
Go to the documentation of this file.
1 /**
2  * \file IMP/statistics/point_clustering.h
3  * \brief Cluster sets of points.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPSTATISTICS_POINT_CLUSTERING_H
10 #define IMPSTATISTICS_POINT_CLUSTERING_H
11 
12 #include <IMP/statistics/statistics_config.h>
14 #include "Embedding.h"
15 
16 IMPSTATISTICS_BEGIN_NAMESPACE
17 
18 
19 
20 /** Return a k-means clustering of all points contained in the
21  embedding (ie [0... embedding->get_number_of_embeddings())).
22  These points are then clustered into k clusters. More iterations
23  takes longer but produces a better clustering.
24 
25  The algorithm uses algebra::EuclideanVectorKDMetric for computing
26  distances between embeddings and cluster centers. This can be
27  parameterized if desired.
28 */
29 IMPSTATISTICSEXPORT PartitionalClusteringWithCenter*
30 create_lloyds_kmeans(Embedding *embedding,
31  unsigned int k, unsigned int iterations);
32 
33 /** Two points, \f$p_i\f$, \f$p_j\f$ are in the same cluster if
34  there is a sequence of points \f$\left(p^{ij}_{0}\dots p^{ij}_k\right)\f$
35  such that \f$\forall l ||p^{ij}_l-p^{ij}_{l+1}|| < d\f$.
36  */
37 IMPSTATISTICSEXPORT PartitionalClusteringWithCenter*
38 create_connectivity_clustering(Embedding *embed,
39  double dist);
40 
41 
42 /** The space is grided with bins of side size and all points
43  that fall in the same grid bin are made part of the same cluster.
44 */
45 IMPSTATISTICSEXPORT PartitionalClusteringWithCenter*
46 create_bin_based_clustering(Embedding *embed,
47  double side);
48 
49 /** Cluster by repeatedly removing edges which have lots
50  of shortest paths passing through them. The process is
51  terminated when there are a set number of
52  connected components. Other termination criteria
53  can be added if someone proposes them.
54  */
55 IMPSTATISTICSEXPORT
56 PartitionalClustering *create_centrality_clustering(Embedding *d,
57  double far,
58  int k);
59 
60 IMPSTATISTICS_END_NAMESPACE
61 
62 #endif /* IMPSTATISTICS_POINT_CLUSTERING_H */