EasyDeepLearn

How does the gap statistic work?

hard

Answer

  • Compare observed within-cluster dispersion WkW_{k} to expected WkW_{k} under a null reference distribution (uniform in the bounding box).
  • Gap(k)  =  E[log  Wk]    log\mathrm{Gap}(k)\; = \;E \cdot [\operatorname{log}\;W_{k} \cdot ]\; - \;\operatorname{log} WkW_{k}.
  • Pick smallest k such that Gap(k) ≥ Gap(k+1)    sk+1\mathrm{Gap}(k + 1)\; - \;s_{k + 1}.
  • More principled than the elbow; handles cluster-vs-no-cluster case (returns k=1 when data is unstructured).
  • Costly (needs B ~ 20 reference simulations).
Check yourself — multiple choice
  • Same as elbow
  • Compare log WkW_{k} to expected under uniform null; pick smallest k with Gap(k) ≥ Gap(k+1) - s; handles k=1 case; costly
  • Random
  • Only tiny data

Gap statistic: log WkW_{k} vs uniform null; principled k selection.

#clustering#evaluation

Practise Unsupervised Learning

214 interview questions in this topic.

Related questions