Machine Learning

105602
Back to Machine Learning

Module 5: Clustering

  1. 1(h). K-medoids differs from K-means because K-medoids uses (i) An actual data point as the cluster representative (ii) The mean of all clusters (iii) A randomly generated point (iv) Eigenvectors20262m

    Module 5: Clustering

    K-medoids differs from K-means because K-medoids uses (i) An actual data point as the cluster representative (ii) The mean of all clusters (iii) A randomly generated point (iv) Eigenvectors

    View this question on its own page →
    Worked Solution

    Answer: (i) An actual data point as the cluster representative

    K-medoids selects an observed data point (a medoid) as each cluster's representative. K-means uses the arithmetic mean, which need not be an actual data point.

  2. 1(i). A dataset contains two elongated, non-spherical clusters. Which method is generally more appropriate than standard K-means? (i) K-means (ii) Linear regression (iii) Density-based clustering (iv) Naive Bayes20262m

    Module 5: Clustering

    A dataset contains two elongated, non-spherical clusters. Which method is generally more appropriate than standard K-means? (i) K-means (ii) Linear regression (iii) Density-based clustering (iv) Naive Bayes

    View this question on its own page →
    Worked Solution

    Answer: (iii) Density-based clustering

    Density-based methods such as DBSCAN can discover irregularly shaped clusters and label sparse points as noise. K-means works best for compact, roughly spherical clusters under Euclidean distance.

  3. 6(b). Given the 2D points A(1,1), B(1,2), C(2,1), D(2,2), E(8,8), F(8,9), G(9,8), H(15,15), use DBSCAN with ε = 1.5 and MinPts = 3 to identify core, border and noise points and determine the clusters.20267m

    Module 5: Clustering

    Given the 2D points A(1,1), B(1,2), C(2,1), D(2,2), E(8,8), F(8,9), G(9,8), H(15,15), use DBSCAN with ε = 1.5 and MinPts = 3 to identify core, border and noise points and determine the clusters.

    View this question on its own page →
    Worked Solution

    DBSCAN with ε = 1.5 and MinPts = 3

    Assume MinPts includes the point itself. A point is core if its ε-neighborhood contains at least 3 points. Points A–D are mutually within distance (\sqrt2\approx1.414), so each has at least 4 points in its neighborhood. E, F and G are also mutually within ε (their pairwise distances are 1 or (\sqrt2)), so each has 3 points including itself. H is far from every other point.

    • Cluster 1: {A, B, C, D} — all core points.
    • Cluster 2: {E, F, G} — all core points.
    • Noise: H.
    • Border points: none.
    MermaidDiagram
    Rendering diagram…
  4. 8(a). Explain the complete K-means algorithm. Discuss its objective function, convergence criterion, and major limitations.20267m

    Module 5: Clustering

    Explain the complete K-means algorithm. Discuss its objective function, convergence criterion, and major limitations.

    View this question on its own page →
    Worked Solution

    K-means clustering

    K-means partitions data into (K) clusters by minimizing within-cluster squared distance:

    J=∑k=1K∑xi∈Ck∥xi−μk∥2J=\sum_{k=1}^{K}\sum_{x_i\in C_k}\lVert x_i-\mu_k\rVert^2

    Algorithm: (1) choose (K) initial centroids; (2) assign each point to the nearest centroid; (3) recompute each centroid as the mean of assigned points; (4) repeat assignment and update until assignments/centroids stop changing or a maximum iteration count is reached.

    MermaidDiagram
    Rendering diagram…

    Each iteration does not increase the objective, so the algorithm converges to a local optimum. Limitations: must choose K, sensitive to initialization and outliers, favors roughly spherical similarly scaled clusters, and requires numeric distance-compatible features.

  5. 8(b). Explain hierarchical clustering. Differentiate between agglomerative and divisive approaches and explain how a dendrogram is constructed.20267m

    Module 5: Clustering

    Explain hierarchical clustering. Differentiate between agglomerative and divisive approaches and explain how a dendrogram is constructed.

    View this question on its own page →
    Worked Solution

    Hierarchical clustering

    Hierarchical clustering builds a nested sequence of clusters and represents it using a dendrogram.

    • Agglomerative (bottom-up): begin with each point as its own cluster; repeatedly merge the closest clusters using a linkage rule (single, complete, average or Ward).
    • Divisive (top-down): begin with all points in one cluster and recursively split them.

    The dendrogram's leaves represent observations; branch heights represent merge/split dissimilarity. Cutting the dendrogram at a chosen height produces a flat clustering. Hierarchical clustering need not require K in advance, but naive implementations can be computationally expensive and early merges/splits are generally irreversible.

  6. Q3(b). Differentiate between unsupervised and descriptive learning.20237m

    Module 5: Clustering

    Differentiate between unsupervised and descriptive learning.

    View this question on its own page →
  7. Q8(a). Explain the principle of unsupervised and descriptive learning with respect to clustering.20237m

    Module 5: Clustering

    Explain the principle of unsupervised and descriptive learning with respect to clustering.

    View this question on its own page →