IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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-2022 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
16IMPSTATISTICS_BEGIN_NAMESPACE
17
18/** Return a k-means clustering of all points contained in the
19 embedding (ie [0... embedding->get_number_of_embeddings())).
20 These points are then clustered into k clusters. More iterations
21 takes longer but produces a better clustering.
22
23 The algorithm uses algebra::EuclideanVectorKDMetric for computing
24 distances between embeddings and cluster centers. This can be
25 parameterized if desired.
26*/
28 Embedding *embedding, unsigned int k, unsigned int iterations);
29
30/** Two points, \f$p_i\f$, \f$p_j\f$ are in the same cluster if
31 there is a sequence of points \f$\left(p^{ij}_{0}\dots p^{ij}_k\right)\f$
32 such that \f$\forall l ||p^{ij}_l-p^{ij}_{l+1}|| < d\f$.
33 */
34IMPSTATISTICSEXPORT PartitionalClusteringWithCenter *
36
37/** The space is grided with bins of side size and all points
38 that fall in the same grid bin are made part of the same cluster.
39*/
40IMPSTATISTICSEXPORT PartitionalClusteringWithCenter *
42
43/** Cluster by repeatedly removing edges which have lots
44 of shortest paths passing through them. The process is
45 terminated when there are a set number of
46 connected components. Other termination criteria
47 can be added if someone proposes them.
48 */
50 Embedding *d, double far, int k);
51
52IMPSTATISTICS_END_NAMESPACE
53
54#endif /* IMPSTATISTICS_POINT_CLUSTERING_H */
Cluster sets of points.
Cluster sets of points.
Store data to be clustered for embedding based algorithms.
Definition Embedding.h:25
A base class for clustering results where each item is in one cluster.
PartitionalClusteringWithCenter * create_bin_based_clustering(Embedding *embed, double side)
PartitionalClusteringWithCenter * create_lloyds_kmeans(Embedding *embedding, unsigned int k, unsigned int iterations)
PartitionalClustering * create_connectivity_clustering(Metric *metric, double dist)
PartitionalClustering * create_centrality_clustering(Metric *d, double far, int k)