Bird
0
0

You have a dataset with 10 points clustered hierarchically. You want exactly 3 clusters. Which fcluster call correctly achieves this?

hard📝 Application Q15 of 15
SciPy - Clustering and Distance
You have a dataset with 10 points clustered hierarchically. You want exactly 3 clusters. Which fcluster call correctly achieves this?
Afcluster(Z, 0.5, criterion='inconsistent')
Bfcluster(Z, 3, criterion='maxclust')
Cfcluster(Z, 0.5, criterion='maxclust')
Dfcluster(Z, 3, criterion='distance')
Step-by-Step Solution
Solution:
  1. Step 1: Understand criteria for exact cluster count

    To get exactly 3 clusters, use criterion='maxclust' with t=3 specifying number of clusters.
  2. Step 2: Analyze options

    fcluster(Z, 3, criterion='maxclust') correctly uses maxclust with 3 clusters. fcluster(Z, 3, criterion='distance') uses distance criterion which does not guarantee exact cluster count. Options A and C use incorrect thresholds or criteria.
  3. Final Answer:

    fcluster(Z, 3, criterion='maxclust') -> Option B
  4. Quick Check:

    maxclust + t=number of clusters = exact clusters [OK]
Quick Trick: Use criterion='maxclust' with t = desired cluster count [OK]
Common Mistakes:
  • Using distance criterion to get exact cluster count
  • Passing float threshold for maxclust
  • Confusing inconsistent criterion with maxclust

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes