Home/Notes/Unsupervised Learning
Board Exam Notes

Unsupervised Learning Notes

Questions

1–2 questions per paper

Difficulty

Medium

Importance

Essential for Data Science and AI subject modules

Overview

Unsupervised Learning is a machine learning paradigm where models learn patterns from unlabeled data without explicit guidance or feedback. Understanding this is crucial for exams as it forms the foundation for data grouping and feature compression techniques. Aspirants should focus on the objective functions of clustering and the variance-maximization principle of dimensionality reduction.

k-Means Clustering

k-Means is a centroid-based partitioning algorithm that organizes data points into k distinct non-overlapping clusters. It iteratively assigns data points to the nearest cluster center and recalculates centroids to minimize the within-cluster sum of squares.

  • Objective: Minimize Inertia (Sum of squared distances from points to centroids)
  • Initialization: Random assignment of K centroids
  • Step 1: Assignment based on Euclidean distance
  • Step 2: Update centroids by calculating the mean of cluster members
  • Convergence: Occurs when cluster assignments no longer change
  • Sensitive to outliers and initial centroid selection

Hierarchical Clustering

This approach builds a hierarchy of clusters represented by a dendrogram, which allows for visual inspection of cluster relationships at different levels. It functions either via Agglomerative (bottom-up) or Divisive (top-down) strategies.

  • Agglomerative: Each point starts as its own cluster
  • Dendrogram: Tree-based visualization of cluster merges
  • Linkage criteria: Single, Complete, Average, and Ward's linkage
  • Does not require pre-specification of K clusters
  • Computationally expensive for large datasets: O(n^3) or O(n^2 log n)

Principal Component Analysis (PCA)

PCA is a dimensionality reduction technique that transforms correlated variables into a set of linearly uncorrelated variables called Principal Components. It preserves as much variance as possible, capturing the structure of the data in a lower-dimensional space.

  • Identifies eigenvectors of the covariance matrix
  • Eigenvalues correspond to the magnitude of variance captured
  • PC1 captures the maximum possible variance in the data
  • Reduces overfitting by removing noise and irrelevant features
  • Requires data normalization/scaling before execution

Formula Sheet

Inertia = sum(dist(x, centroid_i)^2)

Covariance Matrix = (1/(n-1)) * X^T * X

Euclidean Distance = sqrt(sum((xi - yi)^2))

Exam Tip

Always remember that k-Means minimizes variance within clusters, while PCA maximizes variance across principal components.

Common Mistakes

  • Confusing the purpose of k-Means (partitioning) with Hierarchical clustering (tree structure)
  • Failing to mention the necessity of feature scaling before applying PCA or k-Means
  • Misinterpreting PCA as a classification technique instead of a feature extraction tool

More Revision Notes

Ready to test yourself?

Play topic-wise Unsupervised Learning questions in Aspirant Arcade — gamified MCQ practice.

Download Free