ArticleslgStudy

computer science

Single-linkage clustering

Single-linkage clustering is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Single-linkage clustering rather than just read about it. In short: In statistics, single-linkage clustering is one of several methods of hierarchical clustering. It is based on grouping clusters in bottom-up fashion (agglomerative clustering), at each step combining two clusters that contain the closest pair of elements not yet belonging to the same cluster as each other.

Single-linkage clustering — main illustration
Single-linkage clustering — illustration

Key takeaways

  • Single-linkage clustering belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Single-linkage clustering to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Single-linkage clustering from memory before moving on to harder problems.

Reference excerpt

In statistics, single-linkage clustering is one of several methods of hierarchical clustering. It is based on grouping clusters in bottom-up fashion (agglomerative clustering), at each step combining two clusters that contain the closest pair of elements not yet belonging to the same cluster as each other. This method tends to produce long thin clusters in which nearby elements of the same cluster have small distances, but elements at opposite ends of a cluster may be much farther from each other than two elements of other clusters. For some classes of data, this may lead to difficulties in defining classes that could usefully subdivide the data. However, it is popular in astronomy for analyzing galaxy clusters, which may often involve long strings of matter; in this application, it is also known as the friends-of-friends algorithm.

Overview of agglomerative clustering methods In the beginning of the agglomerative clustering process, each element is in a cluster of its own. The clusters are then sequentially combined into larger clusters, until all elements end up being in the same cluster. At each step, the two clusters separated by the shortest distance are combined. The function used to determine the distance between two clusters, known as the linkage function, is what differentiates the agglomerative clustering methods. In single-linkage clustering, the distance between two clusters is determined by a single pair of elements: those two elements (one in each cluster) that are closest to each other. The shortest of these pairwise distances that remain at any step causes the two clusters whose elements are involved to be merged. The method is also known as nearest neighbour clustering. The result of the clustering can be visualized as a dendrogram, which shows the sequence in which clusters were merged and the distance at which each merge took place. Mathematically, the linkage function – the distance D(X,Y) between clusters X and Y – is described by the expression

D ( X , Y ) = min x ∈ X , y ∈ Y d ( x , y ) , {\displaystyle D(X,Y)=\min _{x\in X,y\in Y}d(x,y),}

where X and Y are any two sets of elements considered as clusters, and d(x,y) denotes the distance between the two elements x and y.

Naive algorithm The following algorithm is an agglomerative scheme that erases rows and columns in a proximity matrix as old clusters are merged into new ones. The N × N {\displaystyle N\times N} proximity matrix D {\displaystyle D} contains all distances d ( i , j ) {\displaystyle d(i,j)} . The clusterings are assigned sequence numbers 0 , 1 , … , n − 1 {\displaystyle 0,1,\ldots ,n-1} and L ( k ) {\displaystyle L(k)} is the level of the k {\displaystyle k} -th clustering. A cluster with sequence number m is denoted (m) and the proximity between clusters ( r ) {\displaystyle (r)} and ( s ) {\displaystyle (s)} is denoted d [ ( r ) , ( s ) ] {\displaystyle d[(r),(s)]} . The single linkage algorithm is composed of the following steps:

Begin with the disjoint clustering having level L ( 0 ) = 0 {\displaystyle L(0)=0} and sequence number m = 0 {\displaystyle m=0} . Find the most similar pair of clusters in the current clustering, say pair ( r ) , ( s ) {\displaystyle (r),(s)} , according to d [ ( r ) , ( s ) ] = min d [ ( i ) , ( j ) ] {\displaystyle d[(r),(s)]=\min d[(i),(j)]} where the minimum is over all pairs of clusters in the current clustering. Increment the sequence number: m = m + 1 {\displaystyle m=m+1} . Merge clusters ( r ) {\displaystyle (r)} and ( s ) {\displaystyle (s)} into a single cluster to form the next clustering m {\displaystyle m} . Set the level of this clustering to L ( m ) = d [ ( r ) , ( s ) ] {\displaystyle L(m)=d[(r),(s)]}

… excerpt ends here. Continue reading the full article.

Illustrations

Single-linkage clustering illustration
Single-linkage clustering illustration
Single-linkage clustering illustration

Worked examples

Example 1 — a first encounter with Single-linkage clustering

Start with the simplest possible case. Write down what Single-linkage clustering claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Single-linkage clustering before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Single-linkage clustering ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Single-linkage clustering

In research
Single-linkage clustering appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Single-linkage clustering in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Single-linkage clustering is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cluster analysis algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Single-linkage clustering outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Single-linkage clustering” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Single-linkage clustering in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Single-linkage clustering means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Single-linkage clustering out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Single-linkage clustering in simple terms?

In statistics, single-linkage clustering is one of several methods of hierarchical clustering. It is based on grouping clusters in bottom-up fashion (agglomerative clustering), at each step combining two clusters that contain the closest pair of elements not yet belonging to the same cluster as eac…

Why does Single-linkage clustering matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Single-linkage clustering?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Single-linkage clustering.

Tags

  • Cluster analysis algorithms

Keep exploring