All questions

Work closed-book. Answers live in the collapsed callouts of each include (same files as the chapter Recall sections). Official PDFs remain the mock of record for full banks.

Labels in the includes: Official / Official-style = course bank or exercise wording; Original = written for this book.

Clustering

Shared

Original — distance choice

Two clinics are compared on age and blood pressure. Blood pressure is recorded in mmHg (roughly 80–180) and age in years (roughly 20–90). Without scaling, which feature tends to dominate Euclidean distance, and why?

Answer Blood pressure: its gaps are larger in absolute units, so they contribute more to \sum_j (x_{ij}-x_{i'j})^2. Standardise if equal influence is intended.
Official-style — compute both distances

For \mathbf{x}_1=(1,1) and \mathbf{x}_2=(4,5), state d_E and d_M.

Answer d_E=5, d_M=7. Euclidean is the straight-line length; Manhattan adds axis-aligned absolute gaps.

K-means

Official — B1 (one iteration)

Six points A–F as in the exercise set. Start at \boldsymbol{\mu}_1=A=(1,1), \boldsymbol{\mu}_2=D=(7,7). Assign, then update.

Answer Assign: \{A,B,C\} to 1, \{D,E,F\} to 2. Updated centroids: (4/3,4/3) and (22/3,22/3). Reason: nearest-centroid assignment, then cluster means.
Official — B3 (silhouette)

a(i)=1.20, b(i)=1.50. Compute s(i) and interpret.

Answer s(i)=0.20. Mildly positive: own cluster is closer, but not by much. Follow up: inspect the observation on a silhouette plot or compare distances to the competing cluster.
Official-style MCQ — nstart

What does kmeans(x, centers = 4, nstart = 25) do with set.seed set?

Answer Seed makes the random process repeatable; nstart = 25 tries several initialisations and retains a lowest-WCSS solution among them. It does not guarantee the global optimum.
Official-style — negative silhouette

What does a negative silhouette say most directly?

Answer The nearest alternative cluster is closer on average than the assigned cluster.
Original — seed vs subsample

A partition is identical across 100 seeds with nstart = 25, but changes across 90% subsamples. What does that say?

Answer Initialisation is not the main weak point; the clustering is sensitive to which observations are present. Seed reproducibility alone is not enough.

Also sit Question banks/kmeans-exercise-set.pdf Sections A–C without scaffolding.

Hierarchical

Official-style — single linkage definition

For clusters G and H, single-linkage dissimilarity is…

Answer The minimum pairwise dissimilarity between a point in G and a point in H. Reason: “closest members” rule.
Official — B1 pattern (complete hierarchy)

Using the four-point complete-linkage matrix above, state the first merge height and the K=2 partition.

Answer First merge \{A,B\} at height 2. At K=2: \{A,B\} and \{C,D\}. Reason: smallest pairwise distance merges first; complete linkage then uses maxima between groups.
Official-style — chaining

GPS tracks form elongated routes; a few isolated errors remain. Why is single linkage risky?

Answer One bridge point (or error) can link distinct routes because only the minimum cross distance matters. Prefer average or complete when compact programme groups are required.
Official-style — silhouette vs purpose

Single linkage K=2 has higher average silhouette than average linkage K=3, but K=2 merely separates salinity extremes while the brief asks for multivariate handling profiles. Strongest conclusion?

Answer Prefer average linkage at K=3 provisionally if it matches the stated purpose; report the weaker silhouette and validate. Largest silhouette is not an automatic override of the decision question.
Original — deterministic fit

Why does hierarchical clustering need no nstart?

Answer For fixed dissimilarities and linkage, each merge is determined by the linkage rule. Random initialisation is not part of the algorithm. Sensitivity still appears through the sample and the linkage choice.

Also sit Question banks/hierarchical-clustering-exercise-set.pdf Sections A–C without scaffolding.

Dimension reduction

PCA

Official — unit length

Why restrict loadings to unit length? Is unit length special?

Answer Without a fixed length, coefficients can be scaled up to inflate variance without changing direction. Unit length is convenient; it makes \operatorname{Var}(Y_i)=\lambda_i.
Official — orthogonality

Problem with simply maximising variance for each component?

Answer Every component would choose the same direction as the first. Later loadings must be orthogonal to earlier ones (and length-constrained).
Official — score calculation

\mathbf{x}=(2,-1,3)', \mathbf{a}_1=(1/3,2/3,2/3)'. Score?

Answer y_1=2.
Official — variance calculation

Same \mathbf{a} and \boldsymbol{\Sigma} as above. Variance?

Answer 16/9.

MDS

Official — parameters

How many parameters for a 2-D map? For a k-D map?

Answer 2n and kn: one coordinate per observation per map dimension.
Official — \delta, d, \hat{d}

Contrast the three.

Answer \delta_{ij} input dissimilarity; d_{ij} fitted Euclidean map distance; \hat{d}_{ij}=f(\delta_{ij}) disparity in non-metric MDS.
Official — non-metric motivation

Why prefer non-metric over metric MDS?

Answer When only the ranking of dissimilarities is meaningful, not their numerical magnitudes.
Official — weights vs interpretation

Does downweighting large \delta_{ij} change how we interpret metric MDS distances? What changes in non-metric MDS?

Answer Metric: no — distances still target numerical dissimilarities; weights only redirect effort. Non-metric: only order may be interpreted.

ISOMAP

Official — why classical MDS

Why classical rather than non-metric MDS inside ISOMAP?

Answer Classical MDS is faster; non-linearity is already in the graph distances.
Official — geodesic?

Does ISOMAP use geodesic distances?

Answer Approximately: shortest paths on a neighbourhood graph, not continuous geodesics on the manifold.
Official — k extremes

Effect of k=1 vs k=n-1?

Answer k=1: often disconnected. k=n-1: reduces to classical MDS on Euclidean edges.
Official — Swiss roll

In what sense is the Swiss roll 2-D in 3-D?

Answer Three observed coordinates, but position on the surface is fixed by two intrinsic coordinates (along the sheet and height).

SOM

Official — empty node prototype

Does an empty node have a prototype? How?

Answer Yes. Initialised, then updated when neighbouring nodes are BMUs.
Official — BMU

What is the best matching unit?

Answer The node whose prototype is closest to the observation in data space.
Official — \sigma^2 calculation

With the bank’s numbers, \sigma^2?

Answer \approx 18.03, from h=0.5 and \|\Delta\boldsymbol{\ell}\|^2=25.
Official — quantisation vs topographic

Define both and how they complement.

Answer QE: average distance to BMU. TE: how often first and second BMUs are non-adjacent. One scores data-space fit; the other scores grid topology.
Official — restricted k-means

In what sense is a SOM restricted k-means?

Answer Prototypes are pulled by neighbours, so they cannot match their own observations as freely as independent centroids.

Autoencoders

Official — encoder / decoder / bottleneck

Roles?

Answer Encoder → code; bottleneck holds the code; decoder reconstructs toward the input space.
Official — like PCA when?

When does an autoencoder behave like PCA?

Answer When activations are linear (squared-error training): same subspace, possible rotation.
Official — denoising

Input and target? Why?

Answer Input corrupted; target clean original. Builds robustness and blocks trivial identity maps.
Official — held-out data

Why required?

Answer Flexible models overfit; need validation/test reconstruction to judge generalisation.

Full official DR bank: Question banks/QuestionBankQuestions.pdf with solutions in Question banks/QuestionBankSolutions.pdf.

Last year’s paper (coding shape only)

STA5077Z Exam Pack/ExamQuestions.pdf — skip DBSCAN and market basket. Use PCA / MDS / ISOMAP / AE / k-means / hierarchical items as timing practice.