Charta is on Google Play: practise on the go. Get the app

Explain unsupervised machine learning algorithms (k-means clustering, principal components analysis and hierarchical clustering) and decide which kinds of problem each handles best

CFA® Level II · Quantitative Methods · Machine Learning · L2.QM.6.d

The idea

Principal components analysis replaces many correlated features with a smaller set of uncorrelated composites. Each component's eigenvalue measures the variance it explains; divide by the sum of eigenvalues for its share, and keep enough components to reach a chosen threshold, often 85% to 95%, using a scree plot. The trade-off is that components are hard to interpret. k-means clustering assigns observations to k clusters, with k fixed in advance, by repeatedly moving centroids. Hierarchical clustering builds a tree of clusters, bottom up (agglomerative) or top down (divisive), shown as a dendrogram, so the number of clusters can be chosen afterwards. PCA reduces features; clustering groups observations.

Formulas

Share of variance in PCA

share of variance = eigenvalue ÷ sum of all eigenvalues

eigenvalue
the variance of one principal component
sum of all eigenvalues
the total variance

Keep components until the running total of these shares reaches the threshold, for example 85%.

In the app: 4 practice questions on this outcome, a narrated walkthrough with diagrams, spaced review that brings it back before you forget it.

Take the free diagnostic →

More in Machine Learning