Exam PA · Data Transformations and Unsupervised Learning Techniques · Free Lesson

Apply K-means and hierarchical clustering to transform data.

Free SOA Exam PA (Predictive Analytics) lesson in Data Transformations and Unsupervised Learning Techniques. 20 min read, ~2,971 words.

Your assistant clusters colleges by tuition and admission rate, then asks whether K equals 2 or 4, and whether to bolt on five more features. Both questions turn on the same handful of clustering rules.

Why cluster at all. Clustering collapses many variables into a single group label. That label is a new feature you feed into a downstream model. It reveals hidden structure (customer segments, geographic zones) and reduces dimensionality without a response variable to guide it. That last point defines it as unsupervised.

KEY: Supervised learning has a target; unsupervised does not. Clustering finds groups, it does not predict a labeled outcome.

K-means, the algorithm. You pick K. The algorithm places K centroids, assigns each point to its nearest centroid, recomputes each centroid as the mean of its members, and repeats until assignments stop changing. It minimizes the total within-cluster sum of squared distances (WCSS).

WCSS=∑k=1K∑x∈Ck∥x−μk∥2\text{WCSS} = \sum_{k=1}^{K} \sum_{x \in C_k} \lVert x - \mu_k \rVert^{2}

Read the full lesson, free →
Worked examples and practice. Free with a free account, no card.

Common mistakes

Bottom line

Exam shortcut

For any "similarities and differences" prompt, write your two differences on opposite axes (does K need pre-specifying? is output a tree or flat labels?) so graders cannot collapse them as converses. Before you interpret any cluster output, confirm the features were standardized; if the prompt gives raw dollars alongside rates, standardization is almost certainly the intended critique.

The full lesson (about 2,971 words, 20 min read) adds 2 worked examples, all 6 common mistakes, a self-check, free in the app.

Learning objectives

Browse all free Exam PA lessons or jump into free Exam PA practice questions.