What are the major families of clustering algorithms?

Last updated 11 November 2026

Clustering algorithms are usually grouped by how they define a cluster: around a center, through a hierarchy of merges, as a dense region, as a probability distribution, or via graph connectivity.

  • Partitioning / centroid-based:

    • Examples: k-means, k-medoids (PAM), mini-batch k-means.

    • Fast and scalable. They need k up front and favor convex, similarly sized clusters.

  • Hierarchical:

    • Agglomerative (bottom-up) or divisive (top-down), producing a dendrogram.

    • The linkage choice (single, complete, average, Ward) shapes the clusters. No k is needed until you cut the tree. Typically O(n²) memory or worse.

  • Density-based:

    • Examples: DBSCAN, HDBSCAN, OPTICS, Mean Shift.

    • Find arbitrary shapes and label noise. They are sensitive to density parameters (eps, min_samples) and struggle when clusters have very different densities (HDBSCAN helps).

  • Distribution / model-based:

    • Gaussian Mixture Models fitted with EM.

    • Give soft assignments and elliptical clusters. Model selection is possible via BIC/AIC.

  • Graph-based / spectral:

    • Spectral clustering embeds data with eigenvectors of a similarity graph's Laplacian, then runs k-means. Community detection methods (Louvain, Leiden) also belong here.

    • Handle non-convex shapes, but they are costly on large n.

  • Others worth naming: grid-based (STING, CLIQUE), BIRCH for streaming or large data, and deep clustering (DEC).

  • https://www.geeksforgeeks.org/machine-learning/different-types-clustering-algorithm/
  • https://developers.google.com/machine-learning/clustering/clustering-algorithms
  • https://www.geeksforgeeks.org/data-science/choosing-the-right-clustering-algorithm-for-your-dataset/
All Clustering interview questions