MS-DS Master of Data science Master of Data science Unsupervised Learning Techniques 1 — Questions and Answers
Question 1: Which unsupervised learning algorithm assigns each data point to the nearest cluster centroid and iteratively updates centroids until convergence?
- K-Means (Correct answer)
- OPTICS
- Gaussian Mixture Models
- Autoencoders
Correct answer: K-Means
K-Means iteratively assigns points to the nearest of K centroids (by Euclidean distance) and recomputes each centroid as the mean of its assigned points, repeating until assignments stop changing.
Question 2: In a Gaussian Mixture Model (GMM), the Expectation-Maximization (EM) algorithm alternates between which two steps?
- Encoding and decoding latent variables
- Computing posterior probabilities and updating distribution parameters (Correct answer)
- Building a dendrogram and cutting it at a threshold
- Projecting data onto principal components and reconstructing the input
Correct answer: Computing posterior probabilities and updating distribution parameters
The E-step computes the posterior probability (responsibility) that each Gaussian component generated each data point; the M-step updates the means, covariances, and mixture weights to maximize the expected log-likelihood.
Question 3: What is the primary purpose of t-SNE (t-Distributed Stochastic Neighbor Embedding)?
- Clustering high-dimensional data into a fixed number of groups
- Visualizing high-dimensional data in two or three dimensions while preserving local structure (Correct answer)
- Removing correlated features before supervised learning
- Detecting anomalies by measuring reconstruction error
Correct answer: Visualizing high-dimensional data in two or three dimensions while preserving local structure
t-SNE converts pairwise similarities in high-dimensional space to probabilities and minimizes the KL divergence between those probabilities and ones in a low-dimensional embedding, making it ideal for 2-D or 3-D visualization of complex datasets.
Question 4: In hierarchical agglomerative clustering, which linkage criterion defines the distance between two clusters as the maximum pairwise distance between their members?
- Single linkage
- Average linkage
- Complete linkage (Correct answer)
- Ward linkage
Correct answer: Complete linkage
Complete linkage uses the farthest (maximum) distance between any point in one cluster and any point in the other, producing compact, roughly equal-sized clusters and reducing the chaining effect seen with single linkage.
Question 5: An autoencoder trained without labels learns a compressed representation of input data in its bottleneck layer. What is this bottleneck representation called?
- Principal component
- Latent code (or latent space) (Correct answer)
- Cluster centroid
- Eigenvector
Correct answer: Latent code (or latent space)
The encoder compresses input into a lower-dimensional latent code; the decoder attempts to reconstruct the original input from it. The latent code captures the most salient features without any labeled supervision.
Question 6: Which metric is commonly used to determine the optimal number of clusters in K-Means by plotting within-cluster sum of squares against K and looking for a sharp bend?
- Gap statistic
- Elbow method (Correct answer)
- Rand index
- Davies-Bouldin index
Correct answer: Elbow method
The elbow method plots the within-cluster sum of squares (inertia) for increasing values of K; the point where the rate of decrease sharply slows—the 'elbow'—suggests the number of clusters beyond which adding more provides diminishing returns.