QUIZ
Unsupervised learning
8 questions on Unsupervised learning, from 7 lessons. Pick an answer in your head, then open it.
On the roadmap for: ML Engineering, Data Science.
Question 1 of 8
What does k-means minimise?
- A. The squared distance from points to their centres
- B. The distance between the cluster centres
- C. The classification error against true labels
- D. The number of clusters that it ends up using
View answer
✓ A. The squared distance from points to their centres
It alternates assigning points to the nearest centre and moving centres to the mean, which suits round, similar-sized clusters.
Lesson: k-Means Clustering
Question 2 of 8
How can you choose k for k-means?
- A. Use the number of features in the data as the number of clusters
- B. Elbow, silhouette, and whether clusters make sense
- C. Always use 3 clusters, the usual default
- D. It doesn't matter: k-means picks k by itself
View answer
✓ B. Elbow, silhouette, and whether clusters make sense
No single rule is perfect; combine a metric with domain judgement.
Lesson: k-Means Clustering
Question 3 of 8
What does hierarchical clustering give you that k-means doesn't?
- A. Probabilities of each point belonging to each of the clusters
- B. A tree of nested groups you can cut at any level
- C. Much faster training on large data
- D. Labels for each cluster automatically
View answer
✓ B. A tree of nested groups you can cut at any level
The linkage method (single, complete, average, Ward) shapes the tree.
Lesson: Hierarchical Clustering
Question 4 of 8
Which clustering method finds curved clusters and labels points that belong to no cluster as noise?
- A. Linear regression
- B. PCA
- C. DBSCAN
- D. k-means
View answer
✓ C. DBSCAN
DBSCAN grows clusters through dense regions, so shape is flexible and isolated points become noise.
Lesson: DBSCAN
Question 5 of 8
What does a Gaussian mixture model give that k-means doesn't?
- A. Fewer clusters than k-means for the same data
- B. Labels for brand-new classes
- C. Much faster results on large datasets with millions of rows
- D. Soft memberships and clusters with their own shapes
View answer
✓ D. Soft memberships and clusters with their own shapes
It's fitted with EM and suits overlapping, tilted clusters.
Lesson: Gaussian Mixture Models
Question 6 of 8
Why should you scale features before PCA?
- A. Otherwise large-unit features dominate variance
- B. PCA only works on integer-valued features
- C. It isn't needed: PCA handles any feature scale
- D. Scaling removes all the outliers in the data
View answer
✓ A. Otherwise large-unit features dominate variance
PCA follows variance, and raw variance depends on units.
Lesson: Principal Component Analysis
Question 7 of 8
In a t-SNE or UMAP plot, what should you NOT read into?
- A. The colours you used for each label
- B. That there are some groups in the data
- C. Which points are close neighbours in the original space
- D. The sizes of clusters and the gaps between them
View answer
✓ D. The sizes of clusters and the gaps between them
These methods keep local neighbourhoods but distort global distances and densities.
Lesson: t-SNE & UMAP
Question 8 of 8
You have no fraud labels. How can an isolation forest flag unusual transactions?
- A. Odd points are isolated in fewer random splits
- B. It clusters transactions by colour
- C. It borrows fraud labels from similar companies instead
- D. It can't: anomaly detection needs labels
View answer
✓ A. Odd points are isolated in fewer random splits
Normal points need many splits to separate; rare, odd ones fall out quickly.
Lesson: Anomaly Detection