Perform the computations behind clustering procedures (e.g., K-means, hierarchical).

Free CAS MAS-II (Modern Actuarial Statistics II) lesson in Statistical Learning. 14 min read, ~2,081 words.

K-means minimizes total within-cluster sum of squares (WCSS), using squared Euclidean distance. You pick up front. Lloyd's algorithm alternates: assign each point to its nearest centroid, then recompute centroids. WCSS strictly decreases each iteration and converges to a local (not global) optimum. Choose with the elbow method on WCSS; minimum...

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

What this lesson covers

Learning objectives

Browse all free MAS-II lessons or jump into free MAS-II practice questions.