0
0
SciPydata~5 mins

Flat clustering (fcluster) in SciPy - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AAn array of cluster labels for each data point
BA linkage matrix
CA dendrogram plot
DThe original data sorted
Which criterion in fcluster cuts the tree by distance threshold?
A'maxclust'
B'distance'
C'inconsistent'
D'monocrit'
If you want exactly 3 clusters from hierarchical clustering, which criterion should you use with fcluster?
A'maxclust'
B'distance'
C'inconsistent'
D'monocrit'
What input does fcluster require to assign clusters?
ARaw data points
BCluster centroids
CLinkage matrix from hierarchical clustering
DDistance matrix only
Which of these is NOT a valid criterion for fcluster?
A'inconsistent'
B'maxclust'
C'distance'
D'kmeans'
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.