Recall & Review
beginner
What is flat clustering in the context of hierarchical clustering?
Flat clustering means cutting the hierarchical clustering tree at a certain level to form groups (clusters) without any nested structure.
Click to reveal answer
beginner
What does the
fcluster function in scipy.cluster.hierarchy do?The
fcluster function cuts a hierarchical clustering tree to assign cluster labels to data points based on a threshold or number of clusters.Click to reveal answer
intermediate
Which parameters are important when using
fcluster?Key parameters are:<br>•
Z: linkage matrix from hierarchical clustering<br>• t: threshold to cut the tree<br>• criterion: method to decide clusters (e.g., 'distance', 'maxclust')Click to reveal answer
intermediate
How does the
criterion='maxclust' option work in fcluster?It forms a flat clustering with a maximum number of clusters specified by
t. The tree is cut to get at most that many clusters.Click to reveal answer
beginner
Why is flat clustering useful after hierarchical clustering?
Flat clustering simplifies the hierarchical tree into clear groups, making it easier to analyze and use clusters for tasks like labeling or further analysis.
Click to reveal answer
What does the
fcluster function return?✗ Incorrect
fcluster returns an array where each element is the cluster label assigned to the corresponding data point.
Which
criterion in fcluster cuts the tree by distance threshold?✗ Incorrect
The 'distance' criterion cuts the hierarchical tree at a specified distance threshold t.
If you want exactly 3 clusters from hierarchical clustering, which
criterion should you use with fcluster?✗ Incorrect
The 'maxclust' criterion cuts the tree to form a maximum number of clusters specified by t, so use t=3.
What input does
fcluster require to assign clusters?✗ Incorrect
fcluster needs the linkage matrix Z which encodes the hierarchical clustering structure.
Which of these is NOT a valid
criterion for fcluster?✗ Incorrect
'kmeans' is not a criterion for fcluster. It is a separate clustering method.
Explain how the
fcluster function works and why it is used after hierarchical clustering.Think about how to get flat groups from a tree structure.
You got /4 concepts.
Describe the difference between using
criterion='distance' and criterion='maxclust' in fcluster.One uses a distance limit, the other uses a cluster count.
You got /3 concepts.