K-means clustering partitions compound representations into a chosen number of groups by repeatedly assigning data points to nearby centroids and recomputing those centroids. It is useful for selecting diverse samples from ultra-large libraries when hierarchical clustering is too slow or memory-intensive. section 7.2.3
Its computational profile is described using:
- Time complexity of O(k × n × i × d), where k is the number of centroids, n the number of data points, i the number of iterations, and d the number of features. section 7.2.3
- Memory complexity of O((n + k) × d), storing the data points and centroids rather than a full pairwise distance matrix. section 7.2.3
- A practical alternative to agglomerative clustering for datasets containing millions of compounds, especially after dimensionality reduction. section 7.2.3











