Unsupervised Machine Learning
- 26Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the fundamental difference between supervised and unsupervised machine learning?
26 questions
- 1
What is the fundamental difference between supervised and unsupervised machine learning?
Model answer
In supervised learning, we have a data matrix X and a response vector Y to predict or detect associations, whereas in unsupervised learning we have only the data matrix X with no response variable.
Explanation
The presence or absence of the response variable Y distinguishes the two paradigms: supervised uses Y for prediction/classification, unsupervised seeks patterns without Y.
- 2
List three common uses of unsupervised learning in the data analysis pipeline.
Model answer
Exploratory data analysis (including data visualization and data wrangling), generating new hypotheses, and in conjunction with supervised learning techniques (e.g., principal component regression).
Explanation
Unsupervised learning is used early in analysis to explore data, later to generate testable hypotheses, and sometimes combined with supervised methods to improve performance.
- 3
Why is it important to validate unsupervised learning results on independent data or held-out datasets?
Model answer
To ensure reproducibility; without external validation, findings may be spurious patterns driven by the same data used to generate hypotheses.
Explanation
Using the same data for hypothesis generation and testing inflates false discovery; independent validation (e.g., cross-validation) is needed for credible conclusions.
- 4
Define the objective of clustering.
Model answer
To group objects into meaningful clusters such that objects within each cluster are more similar to one another than to objects in other clusters.
Explanation
This is a somewhat vague definition because 'meaningful' and 'similar' depend on the chosen criteria and distance measures.
- 5
What are the three types of clustering based on what is being clustered?
Model answer
Clustering observations, clustering features, and clustering both observations and features simultaneously (bi-clustering).
Explanation
Observations (e.g., patients) are most commonly clustered; features (e.g., genes) can be clustered to find functional groups; bi-clustering does both.
- 6
Describe the output of hierarchical clustering and what a dendrogram represents.
Model answer
Hierarchical clustering produces a dendrogram, a tree showing a sequence of nested clusters where leaves are individual observations and branches represent merged clusters.
Explanation
The dendrogram organizes observations into a hierarchy; closer fusions indicate greater similarity.
- 7
Explain the two main approaches to building a hierarchical clustering tree.
Model answer
Bottom-up (agglomerative) starts with each observation as its own cluster and merges until one cluster remains; top-down (divisive) starts with one cluster and splits recursively until each observation is separate.
Explanation
Both produce dendrograms; agglomerative is more common and discussed in the lecture.
- 8
What is a linkage function in hierarchical clustering?
Model answer
A measure of dissimilarity between two clusters, used to decide which clusters to merge.
Explanation
Common choices include single, complete, and average linkage, each defining inter-cluster distance differently.
- 9
Compare single, complete, and average linkage in terms of robustness to outliers and cluster shape sensitivity.
Model answer
Single linkage can identify non-spherical clusters but is sensitive to outliers/noise; complete and average linkage are more robust to outliers but assume roughly spherical, comparable-sized clusters.
Explanation
Single linkage uses minimum distance, making it prone to chaining with outliers; complete and average use maximum or mean distance, which are less affected by distant points.
- 10
What is the 'chaining behavior' of single linkage clustering in high dimensions?
Model answer
Single linkage tends to add one observation at a time to the existing cluster, forming a long chain rather than distinct groups, due to noise in high-dimensional data.
Explanation
This makes single linkage ineffective for many high-dimensional biomedical datasets.
- 11
How should the vertical and horizontal axes of a dendrogram be interpreted?
Model answer
The vertical axis indicates the dissimilarity (height) at which clusters are merged; early (low) fusions show high similarity. The horizontal axis has no meaningful order.
Explanation
The leaves can be reordered arbitrarily; only the vertical heights and topology matter.
- 12
What is the main drawback of k-means clustering compared to hierarchical clustering?
Model answer
K-means does not produce a hierarchy of clusters; changing the number of clusters k can completely reassign memberships with no nesting relationship.
Explanation
Hierarchical clustering yields nested clusters for any cut, but k-means partitions are independent for different k.
- 13
Describe the k-means clustering algorithm.
Model answer
Step 1: randomly assign observations to k clusters. Step 2: calculate cluster centroids (means). Step 3: reassign each observation to the nearest centroid. Repeat steps 2-3 until assignments stabilize.
Explanation
This iterative algorithm finds a local optimum for the objective of minimizing within-cluster sum of squares.
- 14
What types of clusters does k-means work best for, and what problem can occur?
Model answer
K-means works best for compact, spherical clusters of roughly equal size. It may produce empty clusters, especially with outliers, which can be removed and the algorithm refit.
Explanation
Similar to complete linkage, k-means assumes spherical distributions; outliers can cause empty clusters.
- 15
How can one choose the number of clusters in k-means clustering?
Model answer
Vary k and plot the objective function (within-cluster sum of squares) against k; look for an 'elbow' where the decrease flattens. Alternatively, validate on downstream supervised tasks.
Explanation
The elbow method is heuristic; more rigorous is using cross-validation in the full analysis pipeline.
- 16
What is the goal of principal components analysis (PCA)?
Model answer
To find a lower-dimensional representation of the data that captures most of the variation (or information) in the original features.
Explanation
PCA achieves dimension reduction by projecting data onto orthogonal directions that maximize variance.
- 17
How does PCA choose the direction for the first principal component?
Model answer
It chooses the linear combination (direction) of the original variables that captures the maximum variance in the data.
Explanation
The first PC is the line along which the data has the greatest spread; subsequent PCs are orthogonal directions maximizing remaining variance.
- 18
What constraint is placed on subsequent principal components after the first?
Model answer
Each subsequent principal component is orthogonal (perpendicular) to all previous ones while still maximizing variance.
Explanation
Orthogonality ensures that each PC captures unique information not already explained by earlier PCs.
- 19
In the context of PCA, what is a biplot?
Model answer
A biplot displays both observations (as points) and original variables (as arrows) in the space of the first two principal components.
Explanation
Arrows show how each variable contributes to the PCs; the plot helps interpret patterns in the data.
- 20
How can PCA be used to correct for batch effects in biomedical data?
Model answer
PCA can identify artificial non-biological variation due to batch effects; these components can be removed or adjusted to retain true biological signal.
Explanation
Batch effects often appear as large principal components that do not correspond to biological factors.
- 21
What is principal component regression and how does it combine unsupervised and supervised learning?
Model answer
Principal component regression first applies PCA to reduce dimensionality, then uses the principal components as predictors in a regression or classification model.
Explanation
This hybrid method leverages unsupervised learning for dimension reduction followed by supervised prediction, often improving performance in high-dimensional settings.
- 22
Why is it difficult to validate the results of unsupervised learning methods?
Model answer
Because there is no response variable to use for cross-validation; validation often requires independent datasets or evaluation within a larger analysis pipeline.
Explanation
Without a ground truth, assessing cluster quality or dimension reduction effectiveness is inherently subjective.
- 23
How can data preprocessing (e.g., centering and scaling) affect clustering results?
Model answer
Centering and scaling can change distances between observations, thus altering the resulting clusters dramatically.
Explanation
Variables with larger scales may dominate distance calculations if not scaled, so preprocessing is a critical step.
- 24
According to the Q&A, what is the recommended approach for choosing a distance measure in hierarchical clustering?
Model answer
Try several distance measures and validate which one produces more generalizable results (e.g., on a test set) within the full data analysis pipeline.
Explanation
There is no universally best distance; empirical validation is needed to select the measure that yields reproducible findings.
- 25
Why is PCA not ideal for identifying which original features are associated with an outcome?
Model answer
Because each principal component is a linear combination of all original features, making it difficult to interpret associations with individual variables.
Explanation
PCA is a rotation; the resulting components mix variables, so they are not directly interpretable for feature selection.
- 26
In unsupervised learning, what is the role of the data scientist in striking a balance with automated methods?
Model answer
Unsupervised learning often requires active involvement from the data scientist to choose methods, tune parameters, and interpret results, but care must be taken not to overfit by finding artificial patterns.
Explanation
Human judgment is needed because unsupervised tasks lack a clear objective function; validation on independent data helps avoid spurious discoveries.

Ask anything
We've read this whole study set, so questions about it get the best answers.