k-means sorts accounts into groups that look alike, with no answer column to check against. In five short steps on the deck's 2,200 Summit Gear accounts, you will see why you scale first, what your own settings change, how to name a group, and what the groups do and do not tell you about credit risk. Lab 12 asks for the same moves in your own notebook on a different set of columns, so do this first. About 10 minutes.
Steps 2 to 5 unlock after your guess in Step 1.
Step 1 of 5
Guess first: which column takes over?
Why. k-means calls two accounts alike when their numbers are close, added up across all 8 columns. Nothing is scaled yet, so dollars, days and counts go in as they are.
Do this. Pick the one column you think will decide the clusters. Each button shows a typical value.
Step 2 of 5
Change what k-means is given
Why. There is no answer column, so scaling, k and the columns are your call. Each one changes the groups.
Do this. Make the four tries in order. After each one, read the line above the chart. It says what changed.
Try 1Scale
Try 2Number of clusters
4
Try 3Columns
Try 4A column with no signal
Watch k-means work
Step 3 of 5
Read the groups and name them
Why. k-means hands back cluster numbers and nothing else. A number means nothing to a credit manager, so the name is your job, and it comes from the medians.
Do this. Compare each row with the All accounts row. Type a short business name for each cluster. Then show the suggested names and compare. Cluster 1 has the highest median annual spend.
Step 4 of 5
Find the accounts that fit no group
Why. Once the groups are set, the accounts far from every center stand out. That is how this week gets from alike to unusual.
Do this. Ring them on the chart, then read what makes them unusual.
See the 22 accounts
Distance is to the account's own cluster center, in the units k-means used (standard deviations when the columns are scaled). The most extreme column is the one with the largest z-score, above or below the average. It is the account's most unusual column overall, not necessarily what puts it far from its own center.
Step 5 of 5
Bring defaulted back
Why. k-means never saw defaulted. Putting it back is the check after the fact: did the groups find credit risk, or something else? The base rate is 438 of 2,200 accounts, 19.9%.
What you just saw
Unscaled, the column with the biggest numbers decides everything.
Scaling, k and the columns are your choices. Change them and the groups change.
A cluster number is a label. The name comes from you, and from the medians.
Far from a center means unusual. It is a reason to ask a question, not a finding.
The groups can only find what is in the columns you feed them.
Every step stays open now. Go back to Step 2, change a setting, and the tables in Steps 3 to 5 follow the new fit. Then do it in your own notebook: Lab 12.
Chart viewThese change the picture only, not the clusters.
Loading the accounts.
The chart is a flat view. It shows two columns. k-means used every column ticked in Step 2 (all 8 to start), so groups can overlap here and still sit apart. Change X and Y to look from another side.