Skip to main content

"Do as your Neighbor Do" principle

Short answer

"Do as your neighbour does" means nearest-neighbor classification: assign class by majority of closest objects, using distance to measure similarity and likelihood to choose class. Hierarchical clustering creates a tree of nested clusters without presetting k, O(n²); partitioning (k-means) splits into k groups iteratively, faster but requires spherical clusters.

"Do as your Neighbor Do". Explain this concept on behalf of Likelihood and Distance principle. Differentiate between hierarchical clustering and partitioning clustering technique.

"Do as your neighbour does" and the likelihood-and-distance principle

This phrase means that an object behaves like the objects nearest to it. Under the distance principle, objects close to each other in attribute space are similar and likely to share the same class or cluster; under the likelihood principle, the class most probable among its neighbours is assigned to the object.

This is the idea of K-nearest neighbour (KNN):

  1. Compute the distance (e.g. Euclidean) from the new object to every stored object.
  2. Choose the K nearest ones (its "neighbours").
  3. Assign the majority class of these neighbours (or their average, for prediction).

Example: a customer whose 3 nearest customers (by age and income) all bought a laptop is predicted to buy a laptop too. The same idea clusters data: an object joins the cluster of the centre it is nearest to.

Hierarchical vs partitioning clustering

BasisHierarchicalPartitioning
ResultNested clusters shown as a tree (dendrogram)One flat set of k non-overlapping clusters
Number of clusters kNot needed in advance; choose by cutting the dendrogramMust be given in advance
MethodAgglomerative (bottom-up) or divisive (top-down)Iterative relocation (k-means, k-medoids)
Merge/splitOnce done, cannot be undoneObjects can move between clusters in later iterations
ComplexityAt least O(n²), poor for big dataAbout O(nkt), good for big data
Cluster shapeCan find arbitrary shapes (with single link)Tends to find spherical clusters
ExamplesAGNES, DIANA, BIRCHk-means, k-medoids (PAM)

✓ Answer checked by Claude Opus 5.5 (high effort)

All Data Mining chapter 3 questions →