0
0
ML Pythonprogramming~5 mins

Hierarchical clustering in ML Python - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is hierarchical clustering?
Hierarchical clustering is a way to group data points into clusters by building a tree of clusters. It starts with each point alone and merges them step-by-step or starts with all points in one cluster and splits them.
Click to reveal answer
beginner
What are the two main types of hierarchical clustering?
The two main types are:
1. Agglomerative: starts with single points and merges clusters.
2. Divisive: starts with one big cluster and splits it into smaller ones.
Click to reveal answer
beginner
What is a dendrogram in hierarchical clustering?
A dendrogram is a tree-like diagram that shows how clusters are merged or split at each step. It helps to decide the number of clusters by cutting the tree at a certain height.
Click to reveal answer
intermediate
How do you measure the distance between clusters in hierarchical clustering?
Common methods include:
- Single linkage: distance between closest points.
- Complete linkage: distance between farthest points.
- Average linkage: average distance between all points.
- Ward's method: minimizes variance within clusters.
Click to reveal answer
intermediate
Why might hierarchical clustering be preferred over k-means?
Hierarchical clustering does not need you to choose the number of clusters upfront and can show relationships between clusters. It works well with small datasets and can capture complex cluster shapes.
Click to reveal answer
Which of the following is a characteristic of agglomerative hierarchical clustering?
AStarts with each data point as its own cluster
BStarts with one cluster containing all points
CRequires the number of clusters to be specified first
DOnly works with numerical data
What does a dendrogram represent in hierarchical clustering?
AA tree showing how clusters merge or split
BA histogram of distances
CA scatter plot of data points
DA graph showing cluster centers
Which linkage method considers the farthest distance between points in two clusters?
AAverage linkage
BSingle linkage
CComplete linkage
DWard's method
What is a key advantage of hierarchical clustering over k-means?
AIt is faster on large datasets
BIt does not require choosing the number of clusters upfront
CIt only works with numerical data
DIt always produces spherical clusters
Which hierarchical clustering method starts with one cluster and splits it into smaller clusters?
AAgglomerative
BDBSCAN
CK-means
DDivisive
Explain how agglomerative hierarchical clustering works step-by-step.
Describe how a dendrogram helps in deciding the number of clusters.