learn-unsupervised-with-phoebe / Session 9 of 10
Learn Unsupervised with Phoebe · Session 9 of 10

When clustering lies

Since session 1 there has been a sticky note on this course: "the algorithm always succeeds - only the analyst can fail." Every session since has added a tool; this one adds the immune system. Today you watch k-means succeed at absolutely nothing - five confident, colorful segments carved out of pure random noise - and you learn the tells that separate structure from theater. Then the hardest skill of all: recognizing the projects where the honest deliverable is "we chose not to cluster."

🟠 Deepening Builder track The skeptic session 45 min + self-study depth
0-3 · Welcome 3-20 · Concepts 20-40 · Cluster pure noise 40-45 · Q&A
Part 0

The session the whole course promised

Eight sessions of building deserve one session of doubt. You now know how k-means thinks (session 3), how to pick k (session 4), what the rivals fix (session 5), and how to name and ship segments (session 7). What you have NOT yet seen is the failure mode that makes all of that necessary: a clustering that is wrong while looking exactly like every clustering that was right. There is no error message for this. There is only the analyst who thought to check - and this session is the checklist.

Live - covered in session Self-study - read after ✦ Lab moment 🥭 The Mango Lane case
★ What you walk out with today A catalog of the four ways a clustering deceives, a skeptic's checklist of tells (led by the noise baseline: our real pile scores 0.68, pure noise scores 0.31), and the professional courage to say the sentence almost nobody says: "this data should not be clustered."
The honesty rail (used all course) The lab can show you a "truth match" score only because our customers are simulated with five planted segments. Today's noise mode plants NOTHING - which is the whole point. On real data you never know which of those two worlds you are standing in; the tells below are how professionals find out.
Part 1 · covers the failure modes

The lies, cataloged 7 min live

A clustering deceives in four distinct ways, and they are worth telling apart because each has a different cure. What they share is the property that makes this session necessary: every one of them produces output that looks exactly like success.

The gallery of lies - four clusterings that looked fine 1 · Noise clusters k-means partitions anything, even noise 2 · Wrong assumptions stretched blobs get confident wrong cuts 3 · Fake elbows an elbow? uniform noise still traces a bendy curve 4 · Artifacts cents a unit choice posing as customer segments Four different lies, one shared property: every output looks exactly like a success.
🔍 Click to zoom - the gallery of lies, one caricature per failure mode
LiveThe four lies, one by one5 min▶
  • Lie 1 - noise still clusters. k-means partitions whatever you feed it. Ask for five clusters of pure random noise and you receive five clusters of pure random noise, colored and centered and ready for a deck. Today's lab is this lie, performed live.
  • Lie 2 - assumption violations. Even on data with real structure, k-means assumes roughly round, similar-sized blobs. Feed it stretched (anisotropic) blobs, unequal variances, or the wrong k and it cuts confidently across the real boundaries. scikit-learn's own docs ship a demo of exactly this.
  • Lie 3 - fake elbows. Session 4 demoted the elbow method; here is the reason at full strength. Even uniform random noise traces a bendy inertia curve, so "I see an elbow" is evidence of almost nothing (Schubert's 2023 critique: stop using the elbow criterion).
  • Lie 4 - artifact segments. Sometimes the structure is real but manufactured by the pipeline: session 2's cents column invented wallet-band "segments" that were really a unit choice; session 4's k=12 sliced five real groups into twelve fundable-sounding shards. The data lied because we made it lie.
Real worldscikit-learn's "Demonstration of k-means assumptions" page is the rare official document whose entire purpose is showing the library's own tool producing convincing nonsense - wrong k, anisotropic blobs, unequal variances, each yielding tidy confident clusters that are wrong. When the maintainers of the most used ML library on earth dedicate a doc page to "here is our algorithm lying", the professional response is to memorize the page.
Self-studyWhy lie 4 is the one that gets published2 min▶

Lies 1-3 are the algorithm's doing; lie 4 is yours. That makes it the most common in practice, because it survives review: the clusters ARE separable, the silhouette IS decent, and nothing on screen reveals that the separation traces a billing-system unit or an arbitrary k rather than customer behavior. The only defenses are the ones this course drilled: know your units (session 2), let the data pick k (session 4), and profile segments on features you did not cluster on (below). An artifact segment is a pipeline shadow - move the lamp and it moves with it.

Part 2 · covers the skeptic's checklist

The tells 7 min live

None of the four lies announces itself, so skeptics carry a checklist. Each tell is a question you can answer with an afternoon of work - and each one is a comparison, because in a world with no ground truth, a score only means something next to another score.

☐ Noise baseline same-shape random data: our pile 0.68 vs noise 0.31 ☐ Stability under resampling re-run on subsets: real structure survives, artifacts dissolve ☐ Profile separation do segments differ on features you did NOT cluster on? ☐ The shuffle question would a shuffled version of the data score about the same? Evidence accumulates No single tell is a proof. Together they earn - or deny - the right to present segments as if they were real. If your silhouette sits near the noise line, stop. The deck can wait; the baseline cannot.
🔍 Click to zoom - four tells, one accumulating verdict
LiveEach tell as a working question4 min▶
TellThe questionWhat real structure does
Noise baselineGenerate random data of the same shape and size, cluster it the same way. Where does its silhouette land?Beats the baseline clearly: our real pile 0.68 vs noise 0.31. A score NEAR the noise line means stop.
StabilityResample (drop 20%, re-run) several times. Do the same groups keep forming?Real structure survives resampling; artifacts dissolve into different slices each run.
Profile separationCompare segments on features you did NOT cluster on (device, category mix, region).Real behavior groups usually differ on outside features too; noise slices do not.
The shuffle questionShuffle each column independently (killing the correlations) and re-cluster. Similar score?Real structure collapses when shuffled; if the score barely moves, the score never meant much.

One honest paragraph before anyone gets comfortable: none of these is a proof. A clustering can pass every tell and still be a mediocre way to slice the business, or fail one tell for a fixable reason. They are evidence that accumulates - exactly the hierarchy session 4 taught for picking k, now applied to the bigger question of whether to trust the clustering at all.

Real worldRead any published customer-segmentation case study and count the tells it reports. Most report none - no noise baseline, no stability check, no holdout profile - just a silhouette (sometimes) and five confident personas. That is not because practitioners ran the checks and omitted them; it is because a segmentation deck with no checks looks identical to one with them. Your homework tonight is exactly this audit, and it will change how you read vendor decks forever.
Self-studyBuilding your own noise baseline2 min▶

The recipe is deliberately boring: match the shape (same number of rows and columns), match the ranges (uniform random within each feature's observed min-max, after the same scaling you applied to the real data), run the identical clustering with the identical k, and record the silhouette. Repeat a handful of times and keep the typical value. That number is your floor - the score confidence costs nothing to achieve. It is field practice rather than textbook doctrine, which is exactly why so few decks include it and why yours should.

Self-studyThe picture can lie too (a session 6 echo)2 min▶

Everything above is about scores; the plots have their own lie. Session 6 warned you and session 9 is where the warning belongs: t-SNE at low perplexity makes pure noise look clustered - tight, separated blobs, manufactured entirely by the projection (Distill's "How to Use t-SNE Effectively" demonstrates it interactively). And UMAP's own FAQ blesses clustering on its output only "with care," recommending density-based methods rather than k-means, because density is not preserved. The rule from session 6, restated for skeptics: projection pictures are for LOOKING, never for measuring - a beautiful 2D scatter of clusters is a hypothesis, not a tell. The scores above, with their baselines, are the tells.

Part 3 · covers the hardest call

The courage not to cluster 5 min live

The most senior skill in this course is not an algorithm. It is looking at a dataset, running the tells, and writing the memo that says "we chose not to cluster - here is what we did instead." Four situations call for it.

LiveWhen NOT to cluster3 min▶
  • Continuous gradients. Customer value is often a smooth ramp, not clumps. Clustering a ramp manufactures boundaries that exist nowhere in the data; percentile tiers (top 10%, next 40%, rest) are honest, simple, and easier to maintain than fake clusters.
  • Tiny samples. A few dozen rows cannot support stable clusters - every tell fails, every re-run reshuffles. Sort, eyeball, and use judgment; say so.
  • One-dimensional structure. If one feature carries the story, sort by it. A clustering of six features that secretly follows one of them is a complicated way to hide a ranking.
  • The decision is already made. If the campaigns were designed before the analysis, the segmentation is theater - it can only bless or be ignored. Decline politely; theater has no noise baseline.

And one for the survivors: drift. Real pipelines re-run, and segments move - customers lapse, freshen, upgrade. Schedule reprofiling, alert when segment migration spikes, and honor the review date you wrote on session 7's segment sheet. A segmentation without a review date is a lie with a delay.

The two-sentence memo "We evaluated clustering on [data]; scores sat near a noise baseline and did not survive resampling, consistent with a continuous gradient rather than distinct groups. We recommend percentile tiers on [feature], reviewed quarterly." Practice it - the ability to write this without embarrassment is what this session is for.
Self-studyThe gradient test, in practice2 min▶

How do you tell a gradient from clumps before running anything? Plot the histogram of the feature that matters most. Clumps show as multiple humps with gaps; a gradient shows as one smooth slope. Then run the tells: on a true gradient, k-means will still return your k groups (it always does), the silhouette will be modest, and above all the STABILITY check fails in a telltale way - the boundaries land somewhere different on every resample, because there is no gap for them to snap to. Moving boundaries on stable data is the gradient's fingerprint. When you see it, reach for percentile tiers and write the memo: they deliver the same operational value (differentiated treatment by level) without claiming groups that do not exist.

Self-studyWhere the weird stuff lives2 min▶

One question this session raises but does not answer: what about the points that belong to NO group - the fraud, the glitches, the one-in-a-thousand outliers? That is anomaly detection, the OTHER "find the weird stuff" toolkit and the second pillar of Ng's unsupervised week. It has its own full course on this shelf: learn-anomaly-detection-with-phoebe (the Lumen case). This course finds the groups; that one finds the exceptions. Together they are the two honest answers to "what is in this pile?"

Everyone gets fooled once

Cluster pure noise 🎛 ★ 18 min · everyone runs the lie

The lab below runs the same REAL k-means (best of five k-means++ restarts) you have used all course - but the pile is different. This is the experiment session 1 promised: the algorithm succeeding at nothing, in front of you, beautifully.

Look at the scatter first. These 300 points are uniform random noise - NOTHING was planted. No archetypes, no groups, no structure. This is the one dataset all course where we can promise you there is nothing to find.

Press ▶ Run 5-means on noise. Five confident, colorful segments appear instantly. Centers, borders, member counts - every visual signal you have learned to associate with success, delivered at full confidence on nothing.

Read the silhouette pair. Noise: 0.31. The real Mango Lane pile: 0.68. That comparison is the ONLY tell on screen - nothing else in the picture distinguishes this result from a real one. Sit with that for a moment.

Imagine the deck you could still build. "Segment 3 skews high-monetary with moderate recency - we recommend a premium win-back push." Write one fake persona sentence of your own for any segment on screen. Feel how easy it is - your brain WANTS to narrate. That ease is the danger this session exists to vaccinate against.

The discipline. Your project needs a noise baseline number BEFORE you present segments. Not after someone asks - before. It is one afternoon of work and it is the difference between the two decks in step 4.

Say the sticky note out loud one more time: "the algorithm always succeeds - only the analyst can fail." You have now seen both halves of that sentence happen on the same screen.

✦ Why 0.31 and not 0? Even random points, once partitioned, are trivially closer to their own center than to others - that is what partitioning MEANS. Silhouette on noise does not read zero; it reads "mediocre but positive," which is exactly why an uncalibrated score is so dangerous and a baseline is so cheap by comparison.
Before next session

Homework 📝 ◐ 20 minutes

Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · You run k-means with k=5 on data that is pure structureless noise. What comes back?

k-means partitions; it never refuses and never warns. Ask for five, receive five - centers, borders, and member counts included. The lab just showed you: nothing on screen except the baseline comparison reveals the difference.

2 · Your clustering scores silhouette 0.35. What makes that number meaningful?

A score only means something next to another score. Our real pile earns 0.68; pure noise earns 0.31. A 0.35 sitting on the noise line says stop - and without the baseline you would never know.

3 · Which situation most clearly calls for NOT clustering?

Gradients want percentile tiers, tiny samples want judgment, and pre-made decisions make segmentation theater. Feature count is irrelevant, and 0.7 is not a universal bar - the noise baseline for YOUR data shape is.

Coverage, honestly

What this session covered from the official universe

✓scikit-learn "Demonstration of k-means assumptions"the anisotropic/unequal-variance/wrong-k gallery, taught as lie 2 and run in spirit on the noise lab
✓Elbow-on-noise criticism (Schubert 2023, "Stop using the elbow criterion")fake elbows as lie 3, completing session 4's demotion of the elbow method
✓Noise baseline + stability checkingtaught as field practice, honestly labeled: practitioner discipline rather than textbook doctrine
◐Anomaly detection (Ng's second unsupervised pillar)pointed, not taught - full treatment lives in learn-anomaly-detection-with-phoebe

Certificates, videos, and graded assessments stay with the official providers - this course teaches the working core with a live in-browser lab.

Session 9 cheat sheet

The four liesNoise still clusters · assumption violations · fake elbows · artifact segments. All four look exactly like success.
Noise baselineCluster same-shape random data the same way. Our pile: 0.68 real vs 0.31 noise. Near the noise line = stop.
StabilityResample and re-run. Real structure keeps forming the same groups; artifacts dissolve into different slices.
Profile separationReal segments usually differ on features you did NOT cluster on. Noise slices do not.
No tell is proofThey are evidence that accumulates - session 4's hierarchy applied to the whole clustering, not just k.
When not to clusterGradients (use percentile tiers) · tiny samples · one-feature stories (just sort) · decisions already made (theater).
DriftSegments move on re-run. Schedule reprofiling, alert on migration, honor the review date from session 7.
The sticky note, provenThe algorithm always succeeds - only the analyst can fail. You watched both halves happen on one screen.