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

Capstone: the segmentation project, end to end

Ten sessions ago Mango Lane's marketing team asked one sentence: "we treat 12,000 customers identically - give us segments we can campaign to." Today you answer it in four presses, then hand over the sheet. The capstone is deliberately short on new concepts - it is the whole course, compressed and rehearsed, because the compressed version is what you will actually perform at work: the twenty-minute walkthrough where a stakeholder watches you go from raw export to five named, owned, fundable segments without a single hand-wave.

🔴 Capstone Builder track Ship the segment sheet 45 min + self-study depth
0-3 · Welcome 3-15 · The pipeline recap 15-40 · The four-press ladder 40-45 · Graduation
Part 0

Why the capstone is short on purpose

Every skill in this course was taught slow: a full session on scaling, a full session on picking k, a full session on lies. Nobody at work will give you ten sessions. They will give you a meeting - and in that meeting, the value of everything you learned depends on whether you can run the whole pipeline as one fluent motion, narrating the evidence as you go. So today has one job: compress ten sessions into four presses and three sentences, and prove to yourself the compression holds.

Live - covered in session Self-study - read after ✦ Lab moment 🥭 The Mango Lane case
★ What you walk out with today The full ladder run end to end (raw 0.53/70% to scaled 0.68/100% to k=5 confirmed to five named segments), the segment sheet Mango Lane's marketing team actually receives, a graded rematch against your session-1 hand-sort, and the three-sentence executive summary that carries all of it.
The honesty rail, cashed out This is the last session the "truth match" score exists. It was the teaching instrument - the luxury of knowing the planted answer. Part 3 is about what replaces it on real data, because from tomorrow onward, nothing will tell you 100%.
Part 1 · covers the whole course

The pipeline, one breath 6 min live

Session 1 gave you the workflow before you could fill it in: describe, scale, cluster, validate, name and act. Ten sessions later every station has a tool, a canon number, and a scar. Say the whole thing in one breath - that fluency is the credential.

The whole course, five stations 1 · Describe RFM portrait (u1) 3 numbers each, cents trap included 2 · Scale z-score (u2) truth 70% to 100% sil 0.53 to 0.68 3 · Cluster k-means best-of-5 (u3), inertia 92 shape check (u5) 4 · Validate k=5 at 0.68 (u4) k=12 trap: 0.34 noise 0.31 (u9) 5 · Name + act 5 personas (u7) owners + campaigns rules 3.0x (u8) u5 chose the algorithm by data shape, u6 drew the 2D view (PC1+PC2 = 86%) - support for stations 3-4.
🔍 Click to zoom - five stations, every one earned across ten sessions
LiveOne sentence per station4 min▶

Describe (u1): every customer became three numbers - RFM, the standard retail portrait - and the monetary column arrived in cents, a trap we did not see yet.

Scale (u2): z-scaling put the three features on the same footing, and the truth match jumped 70% to 100% - the cents column had been deciding the whole analysis.

Cluster (u3): Lloyd's loop, k-means++ init, best-of-5 restarts by inertia (ours settles near 92); u5 added the rivals - DBSCAN for weird shapes, GMM for soft borders, hierarchical for the dendrogram - and taught choosing by data shape.

Validate (u4, u9): silhouette peaks at k=5 (0.68), the k=12 vanity press crashes to 0.34, and pure noise scores 0.31 - so 0.68 clears the noise line with room to spare. u6's PCA view (PC1+PC2 = 86% of variance) let us SEE the five groups in 2D.

Name and act (u7, u8): cluster ids became five personas with owners, campaigns, and a review date; association rules added the cross-sell layer (white sneakers to crew socks, lift 3.0x).

Real worldAndrew Ng's unsupervised course ends where its k-means week ends: the algorithm, the objective, choosing k. Everything after that - naming, owners, campaigns, review dates, the noise baseline - is the practitioner layer no MOOC grades, and it is precisely the layer stakeholders pay for. The pipeline above IS the deliverable skill; the algorithm was one station of five.
Self-studyThe scars, collected (what each station cost us)2 min▶

A pipeline recited without its failures is a brochure. Ours earned three scars worth keeping: the cents column (u2) - a harmless-looking unit choice that owned the whole analysis until one z-scaling line took the megaphone away; the unlucky start (u3) - a single random initialization locking at inertia 278 and 65% truth, cured by best-of-5 restarts; and the k=12 vanity press (u4) - twelve sophisticated-sounding segments scoring 0.34, three of them too small to fund. Each scar is a question you now ask automatically on any new project: what units? how many restarts? who chose this k, and with what evidence? That reflex is the course's real residue.

Part 2 · covers the deliverable

Reading the final table like the client 🥭 6 min live

Strip away every scatter plot and score, and what Mango Lane's marketing team actually receives is one artifact: the segment sheet - session 7's format, now with every row filled and defended.

LiveThe segment sheet, final form3 min▶
SegmentSizeSignature (from the 300-customer lab sample)Campaign
VIP regulars55F about 22 orders/yr, $115 basket - the loyal corePerks program
Steady mid-basket90F about 9, $70 basket - the big reliable middleUpsell
One-time gifters60F about 1.2, $98 basket - bought once, spent wellOccasion nudges
Fresh arrivals45F about 3, $45 basket - new, still decidingWelcome flow
Lapsed big spenders50R about 225 days, $93 basket - valuable and goneWin-back

Read it the way the client will: five rows, each with a size worth funding, a signature a marketer can picture, and a campaign someone owns. No silhouettes on this page - the scores live in the appendix, the decisions live here. That separation is deliberate: the sheet is for acting, the appendix is for auditing.

LivePresenting honestly3 min▶

Three disciplines turn a good analysis into a trustworthy presentation:

  • Lead with what the evidence supports. "Silhouette peaks at five and clears the noise baseline" comes before any persona story - evidence first, narrative second.
  • State judgment as judgment. Remember session 4's honest wobble: k=4 at 0.66 was genuinely defensible. Say so. "The data supports four-or-five; we chose five because the fresh arrivals separate cleanly and marketing wants the welcome flow" is stronger, not weaker, for admitting the call.
  • Name the review date. Segments drift. A sheet without a review date is a snapshot posing as a truth; ours says quarterly, out loud, in the meeting.
Real worldWatch what happens to analysts who overclaim: the first time a stakeholder catches "the algorithm discovered five customer types" being quietly walked back, every future deck gets discounted. The analysts with ten-year reputations are the ones who said "we chose to slice five ways, and here is the evidence" from the start. Precision about certainty compounds like interest.
Self-studyWhat goes in the appendix behind the sheet2 min▶

The sheet acts; the appendix audits. When someone technical asks "how do we know these are real," the appendix answers without a meeting: the silhouette-by-k curve with its peak at 5 (0.68) and the k=12 point at 0.34, the noise baseline (0.31) drawn as a line under everything, the scaling before/after pair (0.53 to 0.68), the PCA view (PC1+PC2 = 86%) with segments colored, and the segment profiles on features that were NOT clustered on. Five artifacts, one page each, zero narrative - the evidence stands or it does not. Building the appendix takes an hour when the pipeline is fresh and a week of archaeology when it is not; build it the same day you build the sheet.

Part 3 · covers tomorrow

What you would do differently on real data 4 min live

The honesty rail comes due: no truth match exists out there. Every session said it; today it stops being a caveat and becomes your working condition. Here is what fills the hole.

LiveThe substitutes, and what real pipelines add3 min▶

What replaces the truth match: the noise baseline (does your score clear same-shape random data by a real margin?), stability under resampling (do the groups keep forming?), and holdout profiling (do segments differ on features you did not cluster on?). Three imperfect checks, accumulated - session 9's whole checklist, now load-bearing.

What real pipelines add: fresh data on a schedule (quarterly at minimum for retail), segment-migration alerts (when customers flow between segments faster than usual, something changed - in them or in your pipeline), and a data contract on the RFM inputs so the next unit change arrives as a diff to review instead of a silent cents-style ambush.

🎓 You are here describe, scale, cluster, validate, name, defend learn-feature-engineering-with-phoebe where RFM came from - build better inputs learn-anomaly-detection-with-phoebe the OTHER find-the-weird-stuff toolkit (Lumen) learn-recommendation-with-phoebe association rules grow into recommenders (Kirana) learn-model-evaluation-with-phoebe the judging mindset, supervised side Pick one within a week - the pipeline you just learned stays fluent only if you keep running it.
🔍 Click to zoom - the graduation map: four courses that continue from here
Self-studyThe segmentation that stays alive2 min▶

A segmentation shipped once and never re-run is a photograph of customers who have since moved. The minimum viable maintenance plan fits in one table:

RitualCadenceWhat it catches
Reprofile the segmentsQuarterlyDrift in the signatures - the "steady middle" quietly becoming lighter baskets
Segment-migration alertMonthly (automated)Unusual flow between segments - a real behavior change, or a pipeline change upstream
Data contract check on RFM inputsOn every schema changeThe next cents-style ambush arriving as a reviewable diff instead of a silent break
Full re-validation (k sweep + baseline)Yearly, or after big product shiftsThe structure itself changing - five segments becoming four, or six

Notice the asymmetry: shipping took ten sessions, staying honest takes a few hours a quarter. The review date on the segment sheet is the contract that makes those hours happen.

Self-studyChoosing your next course2 min▶

Four honest routes onward. If your clusterings keep disappointing you, the inputs are usually the problem: learn-feature-engineering. If the pile's exceptions interest you more than its groups: learn-anomaly-detection, the second pillar of the unsupervised world. If session 8's basket rules were your favorite twenty minutes: learn-recommendation is where rules grow into real recommenders. And if you want the judging mindset with labels back in play: learn-model-evaluation. Any of the four will keep this course's muscles warm.

Everyone graduates

The four-press ladder 🥭 ★ 25 min · the whole course in four presses

The lab below is the entire project on one screen: four buttons, each one a session you lived through, each press narrated by you. Run it the way you would run it for Mango Lane's marketing lead sitting next to you - out loud, evidence first.

Press "1 · Raw 5-means." Silhouette 0.53, truth match 70%, and the segments are wallet bands - the cents column running the show. This is the floor, and a reminder of where every unscaled project silently lives without knowing it.

Press "2 · Scale first." 0.68 / 100% - the single biggest jump in the whole project from one preprocessing line. Say WHY in one sentence from session 2: distance treats every unit as equally important, so the biggest raw numbers win unless you scale them level.

Press "3 · Validate k." The sweep confirms k=5 - the peak the data holds, not the number someone wanted. Session 4's discipline in one press: the k=12 vanity option is still there, still scoring 0.34, still refused.

Press "4 · Name + action." The five named segments with campaigns appear - VIP perks, steady upsell, gifter occasion nudges, fresh-arrival welcome flow, lapsed win-back. THIS table is the deliverable. Everything else was the road.

Retrieve your session-1 hand-sort of the twelve customers and grade yourself against the final segmentation. Where did your eye beat the algorithm? Probably the lapsed - recency is visible to a human at a glance. Where did it fool you? Probably gifters vs steady - the cents column made big baskets look like loyalty. Both findings are the course working.

Write the three-sentence executive summary: evidence (silhouette peaks at five and clears the noise baseline), decision (five segments, named, each with an owner), ask (fund the five campaigns, review quarterly). If those three sentences come out clean, you are done - with the session and with the course.

✦ The compressed version IS the skill Ten sessions compress into four presses and three sentences with nothing important lost - because everything important was judgment, and judgment travels light. That is what you are taking with you.
The graduation list

Homework 📝 ◐ this month

Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · The honest segmentation pipeline, in order, is...

Validation comes BEFORE naming - the sequence is the discipline. Naming feels productive and is dangerously fun; the human brain will happily write a persona for a cloud of noise, which is why the checking happens first.

2 · Which single step moved the numbers most in the Mango Lane project, and why?

One preprocessing line beat every algorithmic refinement in the course. Distance treats units as importance, so the biggest raw numbers (cents, in the tens of thousands) owned the analysis until scaling took the megaphone away. k=12 went the other way: 0.34.

3 · On real data there is no truth-match score. What replaces it?

The honesty rail cashed out: truth match existed only because the lab data was simulated. The working substitutes are session 9's checklist - imperfect checks that accumulate into earned confidence. A silhouette alone is exactly what noise at 0.31 teaches you not to trust uncalibrated.

Coverage, honestly

What this course covered from the official universe

✓Full-course recapall ten sessions - you can now describe, scale, cluster, validate, name, and defend an unsupervised segmentation end to end
✓Andrew Ng ML Specialization course 3, week 1k-means intuition, objective, initialization, and choosing k - completed across sessions 1, 3, and 4
✓scikit-learn clustering (2.3) + decomposition (2.5) guidesthe working core: k-means, DBSCAN, GMM, hierarchical, silhouette evaluation, PCA - taught to the 80% bar
◐Certificates and graded labsstay with the official providers - this course taught the working core with a live in-browser lab instead

The whole course in 8 cells

The pipelineDescribe → scale → cluster → validate → name and act. Validation before naming, always.
The portrait (u1)RFM: recency, frequency, monetary. Feature choice IS the analysis - and mind the units.
The scaling jump (u2)Raw cents: 0.53 sil / 70% truth. z-scaled: 0.68 / 100%. The biggest single move in the project.
The algorithm (u3, u5)k-means best-of-5 restarts (inertia 92); DBSCAN for shapes and noise, GMM for soft borders, hierarchical for the tree.
The k call (u4)Silhouette peaks at k=5 (0.68); k=12 vanity crashes to 0.34. Peak + actionability, not decimals - k=4 was defensible, say so.
The view (u6)PCA: PC1+PC2 carry 86% of variance - the honest 2D picture. t-SNE/UMAP for looking, never for measuring.
The skepticism (u9)Noise scores 0.31 and looks like success. Baseline, stability, holdout profile - or do not present. Sometimes: do not cluster.
The deliverable (u7, u8, u10)Five named segments with owners, campaigns (perks / upsell / occasion / welcome / win-back), cross-sell rules, and a review date.