Bird
0
0

What will happen if you set the truncate_mode='lastp' parameter in dendrogram function?

medium📝 Predict Output Q5 of 15
SciPy - Clustering and Distance
What will happen if you set the truncate_mode='lastp' parameter in dendrogram function?
AThe dendrogram is plotted upside down
BThe dendrogram shows all clusters without truncation
CClusters are colored by their size
DOnly the last p merged clusters are shown
Step-by-Step Solution
Solution:
  1. Step 1: Understand truncate_mode parameter

    'lastp' mode truncates dendrogram to show only last p merges.
  2. Step 2: Identify effect on dendrogram

    This reduces complexity by showing only the last p clusters merged.
  3. Final Answer:

    Only the last p merged clusters are shown -> Option D
  4. Quick Check:

    truncate_mode='lastp' limits shown merges [OK]
Quick Trick: Use 'lastp' to show last merges only [OK]
Common Mistakes:
  • Thinking it flips dendrogram
  • Confusing with coloring clusters
  • Assuming no truncation happens

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes