Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the purpose of cluster evaluation metrics?
Cluster evaluation metrics help us measure how well a clustering algorithm has grouped data points. They tell us if clusters are tight and well-separated.
Click to reveal answer
beginner
Explain the Silhouette Score in clustering.
The Silhouette Score measures how similar a point is to its own cluster compared to other clusters. Scores range from -1 to 1, where a higher score means better clustering.
Click to reveal answer
intermediate
What does the Davies-Bouldin Index indicate?
The Davies-Bouldin Index measures the average similarity between clusters. Lower values mean clusters are more distinct and better separated.
Click to reveal answer
intermediate
How does the Calinski-Harabasz Index evaluate clusters?
The Calinski-Harabasz Index compares the variance within clusters to the variance between clusters. Higher values indicate better defined clusters.
Click to reveal answer
intermediate
What is the difference between internal and external cluster evaluation metrics?
Internal metrics use only the data and cluster labels to evaluate quality (e.g., Silhouette Score). External metrics compare clustering results to known true labels (e.g., Adjusted Rand Index).
Click to reveal answer
Which cluster evaluation metric ranges from -1 to 1 and measures how well points fit their clusters?
ACalinski-Harabasz Index
BDavies-Bouldin Index
CAdjusted Rand Index
DSilhouette Score
✗ Incorrect
The Silhouette Score ranges from -1 to 1 and measures how similar points are to their own cluster compared to others.
A lower value of which metric indicates better cluster separation?
ADavies-Bouldin Index
BSilhouette Score
CCalinski-Harabasz Index
DAdjusted Rand Index
✗ Incorrect
The Davies-Bouldin Index measures cluster similarity; lower values mean clusters are more distinct.
Which metric compares variance within clusters to variance between clusters?
ACalinski-Harabasz Index
BSilhouette Score
CDavies-Bouldin Index
DAdjusted Rand Index
✗ Incorrect
The Calinski-Harabasz Index evaluates clustering by comparing within-cluster and between-cluster variance.
Which cluster evaluation metric requires true labels to compare clustering results?
ACalinski-Harabasz Index
BDavies-Bouldin Index
CAdjusted Rand Index
DSilhouette Score
✗ Incorrect
The Adjusted Rand Index is an external metric that compares clustering to true labels.
Internal cluster evaluation metrics use:
ARandom data
BOnly data and cluster labels
CExternal validation data
DTrue labels only
✗ Incorrect
Internal metrics evaluate clusters using only the data and the cluster assignments.
Describe the Silhouette Score and how it helps evaluate clusters.
Think about how close points are to their own cluster versus others.
You got /3 concepts.
Explain the difference between internal and external cluster evaluation metrics.
Consider whether true labels are needed.
You got /3 concepts.
Practice
(1/5)
1. Which cluster evaluation metric is best used when you do NOT have true labels for your data?
easy
A. Adjusted Rand Index
B. Silhouette Score
C. Accuracy Score
D. Mean Squared Error
Solution
Step 1: Understand the role of true labels
Adjusted Rand Index requires true labels to compare clusters, so it is not suitable without labels.
Step 2: Identify metrics for unknown labels
Silhouette Score measures how well clusters are separated without needing true labels.
Final Answer:
Silhouette Score -> Option B
Quick Check:
Unknown labels = Silhouette Score [OK]
Hint: Use silhouette score when labels are unknown [OK]
Common Mistakes:
Confusing Adjusted Rand Index as label-free
Choosing accuracy score which needs labels
Using mean squared error for clustering
2. Which of the following is the correct way to import the silhouette_score function for cluster evaluation?
easy
A. from scipy.cluster import silhouette_score
B. from scipy.spatial.distance import silhouette_score
C. from scipy.cluster.hierarchy import silhouette_score
D. from sklearn.metrics import silhouette_score
Solution
Step 1: Check common library modules
Silhouette score is available in sklearn.metrics module, not in scipy.cluster or spatial.distance.
Step 2: Verify import syntax
The correct import is from sklearn.metrics import silhouette_score.
Final Answer:
from sklearn.metrics import silhouette_score -> Option D
Quick Check:
Correct import = sklearn.metrics [OK]
Hint: Silhouette score is in sklearn.metrics module [OK]
Common Mistakes:
Importing from scipy.cluster directly
Using scipy.spatial.distance for silhouette_score
Confusing hierarchy module with vq
3. What is the output of the following code snippet?
C. Importing davies_bouldin_score from wrong module
D. Davies-Bouldin score requires true labels
Solution
Step 1: Check import source
Davies-Bouldin score is in sklearn.metrics, not scipy.spatial.distance.
Step 2: Validate data and labels
Data and labels lengths match and data as list works with sklearn, so no error there.
Final Answer:
Importing davies_bouldin_score from wrong module -> Option C
Quick Check:
Correct import is sklearn.metrics [OK]
Hint: Davies-Bouldin score is in sklearn.metrics, not scipy [OK]
Common Mistakes:
Importing from scipy.spatial.distance
Assuming data must be numpy array
Thinking Davies-Bouldin needs true labels
5. You have true labels and predicted cluster labels for a dataset. Which metric from scipy or sklearn should you use to evaluate clustering quality by comparing these labels?
hard
A. Adjusted Rand Index
B. Davies-Bouldin Score
C. Silhouette Score
D. Calinski-Harabasz Index
Solution
Step 1: Identify metrics needing true labels
Adjusted Rand Index compares predicted clusters with true labels to measure similarity.
Step 2: Exclude label-free metrics
Silhouette, Davies-Bouldin, and Calinski-Harabasz do not use true labels for evaluation.
Final Answer:
Adjusted Rand Index -> Option A
Quick Check:
True vs predicted labels = Adjusted Rand Index [OK]
Hint: Use Adjusted Rand Index to compare true and predicted labels [OK]