1. University MCA (AI/ML) Semester 2
  2. CAB212
  3. Unit 5

CAB212 · Unit 5: Unsupervised learning

Principal component analysis

7 practice questions

Key points

  • Maximise variance along orthogonal axes
  • Eigenvectors of the covariance matrix
  • Explained ratio = eigenvalue / total
  • Scale first

PCA is an unsupervised, linear dimensionality reduction technique. It finds orthogonal directions (principal components) of maximum variance and projects data onto the top few.

Steps: (1) centre (and usually standardize) the data; (2) compute the covariance matrix; (3) find its eigenvectors and eigenvalues; (4) sort by eigenvalue; (5) project onto the top m eigenvectors.

  • Eigenvalue = variance captured along that component.
  • Explained variance ratio = lambda_i / sum of all lambdas. Keep components until a target such as 95% is reached.
  • Components are uncorrelated; first has the most variance.

Worked example: eigenvalues 4, 1 and 1 sum to 6, so PC1 explains 4/6 = 66.7% of variance.

Uses: visualisation, noise reduction, speeding up models, decorrelating features. Limits: linear only, components are hard to interpret, and variance is not always relevant to the target.

Exam pitfall: always scale features first; otherwise large-scale features dominate the components.

Try two questions

Question 1 · Tier 1, Recall

PCA is mainly used for:

  1. Dimensionality reduction
  2. Label creation
  3. Classification only
  4. Hyperparameter tuning
Show the answer

A. It compresses features while keeping variance.

Question 2 · Tier 3, Apply

Principal components are:

  1. Always parallel
  2. Orthogonal (uncorrelated)
  3. Identical
  4. Equal to original features
Show the answer

B. Each is perpendicular to the others.