liveBook · Manning

Hard clustering

As explained in Advanced Algorithms and Data Structures

A flat hard-clustering algorithm assigns each point to at most one cluster and represents all clusters at the same hierarchy level.

Hard clustering assigns each data point to one cluster, or to none when the algorithm allows noise. Soft clustering instead gives points membership probabilities for groups. section 12.1.2 section 12.3

Hardness describes membership; flatness describes structure. Flat clustering keeps all clusters at one level, while hierarchical clustering builds nested groups. These are separate classification criteria. section 12.1.2

Figure 12.2 The difference between hard and soft clustering can be explained in terms of the membership function they adopt. Hard clustering’s outputs are either 0 or 1 for each point and each cluster, with the constraint that it can be 1 for only one of the point-cluster combinations. Soft clustering’s membership function outputs a probability between 0 and 1 (any value in-between) and for each point, it can be non-zero for multiple clusters.

Compare the membership outputs: hard clustering allows only one cluster assignment per point; soft clustering can assign probabilities across multiple clusters. section 12.1.2

Examples show how hard clustering can pair with different strategies:

  • K-means is centroid-based and flat; it works well for spherical clusters when the number of clusters can be estimated, but poorly for high-dimensional data or non-spherical clusters. section 12.1.2 section 12.2.5
  • DBSCAN is density-based and flat; it can leave outliers unassigned and is considered deterministic. section 12.3 section 12.1.2

How Advanced Algorithms and Data Structures covers it

How deep it goes
Defines exclusive membership and distinguishes it from soft assignment, while treating flatness as a separate criterion.
Examples
Uses k-means and DBSCAN as flat hard-clustering examples with centroid-based and density-based strategies.
What you can do after
Evaluate clustering outputs by checking whether membership is exclusive and whether clusters share one level or form a hierarchy.
How it connects
Connects hard clustering with k-means and DBSCAN, and contrasts it with soft and hierarchical clustering.

Also explained in

Compare how 2 books explain hard clustering →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Advanced Algorithms and Data Structures. The section links point to the parts of the book it draws on.