Skip to content
CS-703 (B) · Data Mining and Warehousing/Quick Revision Short Notes

Data Mining and Warehousing (CS-703 (B)) - Unit 5 Short Notes

How unit 5 is examined

This unit covers clustering (hierarchical, partitional, BIRCH, DBSCAN, CURE) and association rule mining (Apriori, FP-growth); Apriori and hierarchical clustering carry the most marks, and clustering definitions and data types recur every session.

Hierarchical algorithms

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>

Definition. <mark>Clustering is the unsupervised grouping of objects so that objects in the same cluster are highly similar to each other and dissimilar to objects in other clusters; hierarchical clustering builds a nested tree of clusters called a dendrogram.</mark>

Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u5-01" viewBox="0 0 673 262" width="673" height="262" role="img" aria-label="Dendrogram - agglomerative reads leaves to root (merge), divisive reads root to leaves (split)"><style>#dsfig-u5-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u5-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u5-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u5-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u5-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u5-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u5-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u5-01 .t{fill:#16181D;font-weight:500}#dsfig-u5-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u5-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u5-01 .dot{fill:#16181D}#dsfig-u5-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u5-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u5-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u5-01 .ah{fill:#454C5A}#dsfig-u5-01 .ah.hi{fill:#2340B8}#dsfig-u5-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u5-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u5-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u5-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u5-01 .e{stroke:#B1B7C3}html.dark #dsfig-u5-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u5-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u5-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u5-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u5-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u5-01 .t{fill:#E6E8ED}html.dark #dsfig-u5-01 .t.inv{fill:#0F1115}html.dark #dsfig-u5-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u5-01 .dot{fill:#E6E8ED}html.dark #dsfig-u5-01 .ann{fill:#8FA3FF}html.dark #dsfig-u5-01 .lbl{fill:#858D9C}html.dark #dsfig-u5-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u5-01 .ah{fill:#B1B7C3}html.dark #dsfig-u5-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u5-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u5-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u5-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah10" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh10" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><line class="e" x1="255.5" y1="39" x2="117.5" y2="103"/><line class="e" x1="255.5" y1="39" x2="393.5" y2="103"/><line class="e" x1="117.5" y1="103" x2="48.5" y2="167"/><line class="e" x1="117.5" y1="103" x2="186.5" y2="167"/><line class="e" x1="393.5" y1="103" x2="324.5" y2="167"/><line class="e" x1="393.5" y1="103" x2="531.5" y2="167"/><line class="e" x1="531.5" y1="167" x2="462.5" y2="231"/><line class="e" x1="531.5" y1="167" x2="600.5" y2="231"/><rect class="n" x="226" y="24" width="59" height="30" rx="8"/><text class="t" x="255.5" y="39" dy=".35em" text-anchor="middle">ABCDE</text><circle class="n" cx="117.5" cy="103" r="17"/><text class="t" x="117.5" y="103" dy=".35em" text-anchor="middle">AB</text><circle class="n" cx="48.5" cy="167" r="17"/><text class="t" x="48.5" y="167" dy=".35em" text-anchor="middle">A</text><circle class="n" cx="186.5" cy="167" r="17"/><text class="t" x="186.5" y="167" dy=".35em" text-anchor="middle">B</text><circle class="n" cx="393.5" cy="103" r="17"/><text class="t" x="393.5" y="103" dy=".35em" text-anchor="middle">CDE</text><circle class="n" cx="324.5" cy="167" r="17"/><text class="t" x="324.5" y="167" dy=".35em" text-anchor="middle">C</text><circle class="n" cx="531.5" cy="167" r="17"/><text class="t" x="531.5" y="167" dy=".35em" text-anchor="middle">DE</text><circle class="n" cx="462.5" cy="231" r="17"/><text class="t" x="462.5" y="231" dy=".35em" text-anchor="middle">D</text><circle class="n" cx="600.5" cy="231" r="17"/><text class="t" x="600.5" y="231" dy=".35em" text-anchor="middle">E</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Dendrogram - agglomerative reads leaves to root (merge), divisive reads root to leaves (split)</figcaption></figure>

Key points.

  1. Hierarchical clustering needs no number of clusters in advance; the user cuts the dendrogram at a chosen level to get the clusters.
  2. Agglomerative (bottom-up) starts with every object as its own cluster and repeatedly merges the two closest clusters until one cluster remains.
  3. Divisive (top-down) starts with all objects in one cluster and repeatedly splits it until every object is alone; it is costlier and less common.
  4. Single link uses the minimum distance between two clusters, so it can chain clusters together but finds elongated shapes.
  5. Complete link uses the maximum distance between members, giving compact clusters but sensitivity to outliers; average link uses the mean pairwise distance.
  6. The distance matrix is updated after every merge, so the basic method costs at least $O(n^2)$ time and space and does not scale to large databases.
  7. A merge or split can never be undone, so an early wrong decision stays in the tree; this is the main weakness.

Steps.

Step 1: Treat each object as a cluster and compute the distance matrix.
Step 2: Merge the two closest clusters.
Step 3: Update the distances of the new cluster to all others (single, complete or average link).
Step 4: Repeat Steps 2-3 until one cluster remains; draw the dendrogram.

Answer frame. Open with the definition; draw the dendrogram; then develop agglomerative versus divisive, the three linkage rules, and the steps; close with the no-undo and $O(n^2)$ limitation and that BIRCH and CURE fix it.

Pitfall: Do not say hierarchical clustering needs $k$; it is partitional methods that do.

Asked: [14 marks] (Dec 2020) Write short notes: i) DBSCAN ii) BIRCH iii) Partitional Algorithm iv) Hierarchical Algorithms

Partitional algorithms

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. <mark>A partitional algorithm divides $n$ objects into $k$ non-overlapping clusters in one level, so that intra-cluster similarity is maximised and inter-cluster similarity is minimised.</mark>

Key points.

  1. The goal of clustering is high similarity inside each cluster and low similarity between clusters, and partitional methods reach it by optimising a criterion such as the squared error $E=\sum_{i=1}^{k}\sum_{p\in C_i}|p-m_i|^2$.
  2. K-means represents each cluster by its mean, assigns every object to the nearest mean and recomputes the means until they stop changing; it is fast but sensitive to outliers.
  3. K-medoids (PAM, Partitioning Around Medoids) represents each cluster by a medoid, an actual central object, so it is robust to outliers.
  4. PAM picks $k$ random medoids, assigns each object to its nearest medoid, then tries swapping a medoid with a non-medoid; a swap is kept only if it lowers the total cost (sum of distances to medoids), and it stops when no swap improves the cost.
  5. PAM costs about $O(k(n-k)^2)$ per iteration, so it suits only small data sets.

Asked: [7 marks] (Nov 2023) What is the goal of clustering? How does partitioning around medoids algorithm achieve this?

Clustering large databases - BIRCH

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. <mark>BIRCH (Balanced Iterative Reducing and Clustering using Hierarchies) summarises a large database into a height-balanced CF-tree of clustering features in one scan and then clusters the summaries.</mark>

Key points.

  1. A clustering feature is the triple $CF=(N,LS,SS)$: number of points, linear sum and square sum of the points; from it the centroid $LS/N$, radius and diameter are computed.
  2. CFs are additive, so two sub-clusters merge by adding their triples, and no raw points need be stored.
  3. The CF-tree has a branching factor $B$ for non-leaf nodes and a threshold $T$ that limits the radius of each leaf entry.
  4. Phase 1 scans the data once and inserts each point into the closest leaf entry; if the radius exceeds $T$, a new entry is made, and a full node splits. If memory runs out, $T$ is raised and the tree rebuilt.
  5. Phase 2 (optional) condenses the tree into a smaller one by removing outliers and merging crowded sub-clusters.
  6. Phase 3 applies a global clustering algorithm such as agglomerative clustering to the leaf entries; Phase 4 (optional) reassigns all points to the nearest final centroid.
  7. BIRCH is linear in the number of objects, handles large data with limited memory and finds outliers, but it works only for numeric data and spherical clusters of similar size.

Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u5-02" viewBox="0 0 535 198" width="535" height="198" role="img" aria-label="CF-tree - each non-leaf entry summarises the CFs of its child node, leaves hold sub-cluster CFs"><style>#dsfig-u5-02 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u5-02 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u5-02 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u5-02 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u5-02 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u5-02 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u5-02 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u5-02 .t{fill:#16181D;font-weight:500}#dsfig-u5-02 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u5-02 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u5-02 .dot{fill:#16181D}#dsfig-u5-02 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u5-02 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u5-02 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u5-02 .ah{fill:#454C5A}#dsfig-u5-02 .ah.hi{fill:#2340B8}#dsfig-u5-02 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u5-02 .wl .t{font-size:12px;font-weight:700}#dsfig-u5-02 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u5-02 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u5-02 .e{stroke:#B1B7C3}html.dark #dsfig-u5-02 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u5-02 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u5-02 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u5-02 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u5-02 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u5-02 .t{fill:#E6E8ED}html.dark #dsfig-u5-02 .t.inv{fill:#0F1115}html.dark #dsfig-u5-02 .kd{stroke:#E6E8ED}html.dark #dsfig-u5-02 .dot{fill:#E6E8ED}html.dark #dsfig-u5-02 .ann{fill:#8FA3FF}html.dark #dsfig-u5-02 .lbl{fill:#858D9C}html.dark #dsfig-u5-02 .ptr{fill:#8FA3FF}html.dark #dsfig-u5-02 .ah{fill:#B1B7C3}html.dark #dsfig-u5-02 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u5-02 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u5-02 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u5-02 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah11" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh11" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><line class="e" x1="255.5" y1="39" x2="117.5" y2="103"/><line class="e" x1="255.5" y1="39" x2="393.5" y2="103"/><line class="e" x1="117.5" y1="103" x2="48.5" y2="167"/><line class="e" x1="117.5" y1="103" x2="186.5" y2="167"/><line class="e" x1="393.5" y1="103" x2="324.5" y2="167"/><line class="e" x1="393.5" y1="103" x2="462.5" y2="167"/><rect class="n" x="229.5" y="24" width="52" height="30" rx="8"/><text class="t" x="255.5" y="39" dy=".35em" text-anchor="middle">Root</text><circle class="n" cx="117.5" cy="103" r="17"/><text class="t" x="117.5" y="103" dy=".35em" text-anchor="middle">CF1</text><rect class="n" x="19" y="152" width="59" height="30" rx="8"/><text class="t" x="48.5" y="167" dy=".35em" text-anchor="middle">Leaf1</text><rect class="n" x="157" y="152" width="59" height="30" rx="8"/><text class="t" x="186.5" y="167" dy=".35em" text-anchor="middle">Leaf2</text><circle class="n" cx="393.5" cy="103" r="17"/><text class="t" x="393.5" y="103" dy=".35em" text-anchor="middle">CF2</text><rect class="n" x="295" y="152" width="59" height="30" rx="8"/><text class="t" x="324.5" y="167" dy=".35em" text-anchor="middle">Leaf3</text><rect class="n" x="433" y="152" width="59" height="30" rx="8"/><text class="t" x="462.5" y="167" dy=".35em" text-anchor="middle">Leaf4</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">CF-tree - each non-leaf entry summarises the CFs of its child node, leaves hold sub-cluster CFs</figcaption></figure>

Answer frame. Open with the definition and the $CF$ triple; draw the CF-tree; then develop points 1-7 in order with the phases as a list; for the "BIRCH and CURE" question write CURE next (see below) and close with a comparison line on large data and shapes.

Asked: [7 marks] (Nov 2023, Dec 2024, Jun 2025) Explain the following clustering methods in detail. i) BIRCH ii) CURE

DBSCAN

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>DBSCAN is a density-based algorithm that grows clusters from dense regions: a point is a core point if at least $MinPts$ points lie within radius $\varepsilon$ of it.</mark>

Key points.

  1. A border point lies inside the $\varepsilon$-neighbourhood of a core point but is not core itself, and a noise point is neither.
  2. A cluster is formed by all points density-reachable from a core point, so it is grown by repeatedly adding the neighbours of core points.
  3. It finds arbitrary-shaped clusters, needs no $k$ and identifies noise, but it struggles with varying densities and needs good $\varepsilon$ and $MinPts$.

CURE algorithms

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>CURE (Clustering Using REpresentatives) represents each cluster by several well-scattered representative points shrunk towards the cluster centre by a factor $\alpha$.</mark>

Key points.

  1. CURE draws a random sample, partitions it, clusters each partition, and then merges clusters hierarchically by the closest pair of representatives.
  2. Several representatives let it find non-spherical and unequal-sized clusters, unlike a single centroid.
  3. Shrinking the representatives towards the centre dampens the effect of outliers, and remaining outliers are removed; finally all data points are labelled by the nearest representative.
  4. Sampling and partitioning make it scale to large databases.

Association rules: Apriori and alternatives

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>

Definition. ==An association rule $X\Rightarrow Y$ (with $X\cap Y=\varnothing$) states that transactions containing itemset $X$ tend to contain $Y$; its strength is measured by support and confidence.==

Formula. $$\text{support}(X\Rightarrow Y)=\frac{\sigma(X\cup Y)}{N},\qquad \text{confidence}(X\Rightarrow Y)=\frac{\sigma(X\cup Y)}{\sigma(X)}$$

Key points.

  1. An itemset is frequent if its support count is at least the minimum support; a rule is strong if it also meets minimum confidence.
  2. The Apriori property says every subset of a frequent itemset is frequent, so if an itemset is infrequent all its supersets are pruned.
  3. Apriori works level-wise: it finds frequent 1-itemsets $L_1$, joins $L_{k-1}$ with itself to make candidates $C_k$, prunes candidates that have an infrequent subset, and scans the database to count and get $L_k$.
  4. Rule generation: for every frequent itemset $l$ and every non-empty proper subset $s$, output $s\Rightarrow(l-s)$ if confidence $\ge$ min confidence.
  5. Apriori needs one database scan per level and may generate a huge number of candidates.
  6. Alternatives to Apriori are hash-based counting (DHP, which prunes $C_2$ using bucket counts), transaction reduction, partitioning, sampling, the vertical format (Eclat, using tid-lists and intersections) and FP-growth.
  7. Association rule mining is unsupervised (descriptive) learning: there is no labelled target or class attribute, and rules are discovered from the data itself using support and confidence, as in market-basket analysis such as $\{bread\}\Rightarrow\{milk\}$; supervised learning needs labelled examples to predict a known class.
  8. For parallel and distributed Apriori, data is partitioned across nodes, each counts local candidates, and counts are summed globally (count distribution).

Example. 5 transactions, min support count 3, min confidence 70%: T1 {B,M}; T2 {B,D,E,G}; T3 {M,D,E,C}; T4 {B,M,D,E}; T5 {B,M,D,C} (B bread, M milk, D diaper, E beer, C cola, G eggs).

Level Counts Frequent
$C_1$ B4 M4 D4 E3 C2 G1 $L_1$={B,M,D,E}
$C_2$ BM3 BD3 BE2 MD3 ME2 DE3 $L_2$={BM,BD,MD,DE}
$C_3$ BMD2 (BDE, MDE pruned) none

Rules from {D,E}: $D\Rightarrow E$ = 3/4 = 75% (kept); $E\Rightarrow D$ = 3/3 = 100% (kept).

Diagram. Comparison of Apriori and FP-growth (for the Dec 2025 question):

Basis Apriori FP-growth
Approach Generate-and-test candidates Compact FP-tree, pattern growth
Candidates Huge number generated None generated
Database scans One per level, many Two only
Memory Stores candidate sets Stores the FP-tree
Speed Slow on large or dense data Much faster
Search Breadth-first Divide and conquer

Answer frame. Open with the definition of association rule, support and confidence; draw the level table ($C_k\to L_k$); then develop the Apriori property, join, prune, scan and rule generation; close with limits and FP-growth. For "supervised or unsupervised" argue point 7 first and end with "hence unsupervised". For "rule generation" spend the answer on point 4 and the confidence example. For "alternative methods" list point 6 with one line each and end with a comparison.

Pitfall: Confidence divides by the support of the antecedent $X$, not by $N$.

Asked: [7 marks] (Nov 2023, Jun 2025) Explain whether association rule mining is supervised or unsupervised type of learning. Asked: [7 marks] (Dec 2020) Explain rule generation in Apriori Algorithm. Asked: [7 marks] (Dec 2020) Explain various alternative methods for generating frequent item sets. Asked: [7 marks] (Nov 2023) Explain about the Apriori algorithm for finding frequent item sets with an example. Asked: [7 marks] (Dec 2025) What are association rules? Differentiate Apriori and FP-Growth algorithms.

FP growth algorithms

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. <mark>FP-growth mines frequent itemsets without candidate generation by compressing the database into a frequent-pattern tree (FP-tree) and mining it recursively.</mark>

Key points.

  1. Step 1: scan the database once to count items and drop those below minimum support; Step 2: sort the frequent items of each transaction in descending support order.
  2. Step 3: scan again and insert each sorted transaction into the FP-tree, sharing common prefixes and incrementing counts, with a header table linking nodes of the same item.
  3. Step 4: for each item, taken from least frequent, collect its conditional pattern base (the prefix paths) and build its conditional FP-tree.
  4. Mining recurses on the conditional trees and appends the item to the patterns found, so it uses divide and conquer.
  5. It avoids candidate generation and needs only two scans, which makes it faster than Apriori, though the tree can be large.

Asked: [7 marks] (Dec 2020) Explain FP growth algorithms.

Clustering: definition, importance and data types

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. <mark>Clustering is the process of grouping a set of unlabelled objects into clusters of similar objects; it is unsupervised because no class labels are given.</mark>

Key points.

  1. Importance: it discovers hidden patterns, summarises large data, and preprocesses data for other tasks such as outlier detection.
  2. Applications include customer segmentation, document grouping, image segmentation and biology.
  3. Interval-scaled variables (continuous, e.g. height) use Euclidean $d=\sqrt{\sum(x_i-y_i)^2}$ or Manhattan distance after standardisation.
  4. Binary variables use a 2x2 contingency table; symmetric binary $d=(b+c)/(a+b+c+d)$, asymmetric $d=(b+c)/(a+b+c)$.
  5. Categorical (nominal) variables use $d=(p-m)/p$ for $p$ variables with $m$ matches.
  6. Ordinal variables are replaced by ranks scaled to $[0,1]$ using $z=(r-1)/(M-1)$ and then treated as interval; ratio-scaled variables are log-transformed.
  7. Mixed data combines the per-variable distances as a weighted average.

Asked: [7 marks] (Nov 2023, Dec 2024) Define Clustering. Explain about types of data in cluster analysis. Asked: [7 marks] (Dec 2025) Define clustering and explain its importance in unsupervised learning.

Last-minute revision

  • Clustering is unsupervised grouping: high intra-cluster, low inter-cluster similarity.
  • Agglomerative is bottom-up, divisive is top-down; merges cannot be undone.
  • Single link uses minimum distance, complete link maximum, average link the mean.
  • PAM swaps medoids with non-medoids and keeps a swap only if total cost falls.
  • $CF=(N,LS,SS)$; BIRCH has four phases: build CF-tree, condense, global clustering, refine.
  • DBSCAN: core, border and noise points from $\varepsilon$ and $MinPts$.
  • CURE: scattered representatives shrunk by $\alpha$, with sampling and partitioning.
  • Support $=\sigma(X\cup Y)/N$; confidence $=\sigma(X\cup Y)/\sigma(X)$.
  • Apriori property: all subsets of a frequent itemset are frequent.
  • FP-growth: two scans, FP-tree, conditional pattern bases, no candidates.
  • Association rule mining is unsupervised.

Memory hooks

  • BIRCH = CF triple "N, LS, SS": Number, Linear, Square.
  • Apriori = Join, Prune, Scan, repeat (JPS).
  • PAM = Pick, Assign, Move (swap).
  • DBSCAN points: Core is the centre, Border is the edge, Noise is nobody.
  • FP-growth = Fewer scans (two), Prefix tree.

Coverage checklist

  • Hierarchical algorithms: Dec 2020 short notes (14 marks).
  • Partitional algorithms: Nov 2023 goal of clustering and PAM.
  • Clustering large databases - BIRCH: BIRCH and CURE (Nov 2023, Dec 2024, Jun 2025).
  • DBSCAN: covered in the Dec 2020 short notes; no other question.
  • CURE algorithms.: covered with the BIRCH and CURE question.
  • Association rules : Parallel and distributed algorithms such as Apriori: supervised or unsupervised, rule generation, alternative methods, Apriori example, Apriori versus FP-growth.
  • FP growth algorithms: Dec 2020 explain FP-growth.
  • Extra section: clustering definition, importance and data types (Nov 2023, Dec 2024, Dec 2025).
Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in