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

The pile with no labels

Mango Lane's marketing team has 12,000 customers and one request: "give us segments we can actually campaign to." Nobody attached a label to anyone. There is no right answer in the back of the book - and that changes everything about how you work. Today: what unsupervised learning actually is, the three-number portrait we will draw of every customer, and the mindset shift that separates people who cluster well from people who name noise.

🟢 Easiest Builder track No code required - the lab runs in your browser 45 min + self-study depth
0-3 · Welcome 3-22 · Concepts 22-40 · Hand-sort 40-45 · Q&A
Part 0

Why this session exists

Most machine learning courses start where the labels are: here is a spam email, here is a not-spam email, learn the difference. Real business data mostly is not like that. Customers do not arrive stamped with their segment, transactions do not announce which ones belong together, and nobody has time to hand-label 12,000 people. Unsupervised learning is the craft of finding structure anyway - and because there is no answer key, it is also the corner of ML where confident nonsense is easiest to produce. This course teaches both the tools and the skepticism.

Live - covered in session Self-study - read after ✦ Lab moment 🥭 The Mango Lane case
★ What you walk out with today A one-sentence definition of unsupervised learning you can defend, the RFM portrait (the three numbers that describe every Mango Lane customer from here to session 10), and the framing that will save you in session 9: clusters are imposed by the algorithm and validated by you - never simply "discovered".
The honesty rail (used all course) Our lab customers are simulated with five planted segments - which is the only reason the lab can show you a "truth match" score. A real project NEVER gets that number; that is precisely what makes unsupervised work hard. Every metric and algorithm in the lab runs for real in your browser; the safety net of knowing the truth is the one luxury we admit is fake.
Part 1 · covers the working definition

No labels, no teacher 7 min live

Supervised learning has a teacher: every training example carries the right answer, and the model is graded against it. Unsupervised learning is the same data with the answer column deleted. The algorithm's job shifts from "predict the label" to "find structure" - and your job shifts from measuring accuracy to judging whether the structure found is real and useful.

📖 Supervised - with a teacher Every row carries the right answer. "This email is spam. That one is not. Learn the pattern and predict the next one." You can be graded: accuracy, precision, recall - all comparisons against labels somebody supplied. The classification course lives here. 🧭 Unsupervised - no teacher Same table. Answer column deleted. "Here are 12,000 customers. Find the structure. We do not know what it is." Nobody can grade you: no accuracy exists. Internal scores (session 4) and business judgment replace the teacher. This course lives here. Same math family, opposite epistemics: one is graded, the other must justify itself.
🔍 Click to zoom - the answer column is the whole difference
LiveThe three jobs unsupervised learning does4 min▶

Strip away the algorithm names and the field does three things to an unlabeled pile:

  • Group similar things - clustering. "Which customers behave alike?" Sessions 2-5, 7, and the capstone. This is the course's spine.
  • Compress many features into few - dimensionality reduction. "Can 6 columns become 2 without losing the story?" Session 6.
  • Find what goes together - association rules. "What do sneaker buyers also put in the basket?" Session 8.

Everything else you have heard of in this space - anomaly detection, recommenders, topic models - is a cousin of these three, and where a cousin has its own course on this shelf, we will point instead of re-teach.

Real worldAndrew Ng's famous ML specialization teaches exactly one clustering algorithm - k-means - and spends its depth on the objective, the initialization, and choosing k. The pros' secret is not knowing fifty algorithms; it is understanding one deeply enough to know when it is lying. This course follows that philosophy, then adds the two rivals (session 5) that cover k-means' blind spots.
LiveWhat you lose when the labels go3 min▶

Three comforts of supervised learning vanish, and each has a replacement you will learn:

LostWhy it mattersThe replacement
AccuracyNo labels means nothing to be right againstInternal scores like silhouette (session 4)
The train/test split ritualNothing to hold out an answer forStability checks - re-run, does the structure hold? (session 7)
Knowing when you failedA bad classifier scores badly; a bad clustering just... looks fineSession 9, entirely: the ways clustering lies, and the checks that catch it

Write this on a sticky note: in unsupervised work, the algorithm always succeeds - only the analyst can fail. The algorithm will hand you five clusters of anything, including pure noise. Session 9 proves that live.

Self-studyWhere the cousins live (the shelf map)2 min▶

Anomaly detection (the OTHER pillar of Ng's unsupervised week) has its own course: learn-anomaly-detection-with-phoebe, on the Lumen case. Recommenders live in learn-recommendation-with-phoebe. Where RFM features come from and why gets full treatment in learn-feature-engineering-with-phoebe. And the labeled half of the zoo - the ten supervised algorithms - is learn-classification-regression-with-phoebe. This course is the missing sibling: the unlabeled half.

Part 2 · covers the running case

The brief, and the three-number portrait 🥭 8 min live

Our client all course: Mango Lane, the fashion app (average order $68, about $660K a month in GMV). Marketing's brief is one sentence: "We treat 12,000 customers identically; give us segments we can campaign to." Before any algorithm, someone had to decide how to DESCRIBE a customer as numbers. The retail industry solved this decades ago with three: RFM.

Customer #4821, as the pipeline sees her: R · 12 Recency days since her last order. Low = she was just here. High = drifting away. F · 19 Frequency orders per year. The loudest signal of loyalty in the pile. M · 11,200 Monetary average order size... in CENTS. Billing speaks cents. Remember this. Three numbers per customer, 300 sampled customers in the lab - that is the whole dataset. Simple is the point.
🔍 Click to zoom - the RFM portrait: recency, frequency, monetary
LiveWhy these three numbers (and that suspicious cents column)4 min▶

RFM - recency, frequency, monetary - is the standard retail customer portrait, in use since the direct-mail era: it is cheap to compute from any order table, each number has an obvious business meaning, and together they separate the loyal from the lapsed from the one-off far better than demographics do. The classic version even predates ML - marketers binned each into 5 levels and worked 125 cells by hand.

One detail to file away: our monetary column arrived from the billing system in cents - customer #4821's $112 average shows up as 11,200. Billing systems speak cents to avoid rounding errors, exports inherit it, and nobody thought to mention it. It looks harmless today. Session 2 is the story of how this one unit choice quietly breaks the entire analysis - and the one-line fix.

Real worldFeature choice IS the analysis. Google's clustering course spends more time on "how do you define similarity" than on the algorithm itself - because k-means on badly chosen features produces perfectly confident garbage. If you ever wonder why data scientists obsess over feature engineering (there is a whole sibling course on it), unsupervised learning is exhibit A: no labels means no error signal to warn you the features are wrong.
Self-studyWho is in the pile (you will meet them properly in session 7)3 min▶

Because the lab's customers are simulated, we can tell you what was planted: five behavioral archetypes - a small band of VIP regulars, a big middle of steady mid-basket shoppers, a crowd of one-time gift buyers, a stream of fresh arrivals, and a graveyard of lapsed big spenders. Your job across the next nine sessions is to recover them WITHOUT peeking: first badly (session 2, raw units), then perfectly (scaled features), then to validate that five is really the right count (session 4), name them (session 7), and ship campaigns against them (capstone). On a real project you would never know the truth; here the truth is the teaching instrument.

Part 3 · covers the mindset

"Discovered" is the wrong verb 6 min live

Every clustering write-up says the algorithm "discovered" segments. Here is the uncomfortable truth this course will demonstrate live in session 9: k-means always returns exactly k clusters, on any data whatsoever - including pure noise. Ask for five, receive five, always. The algorithm imposes structure; whether that structure was really there is a separate question that only validation can answer.

LiveThe workflow that keeps you honest4 min▶

The whole course is one honest workflow, and you can memorize it today:

Describe - choose features that capture the behavior you care about (RFM, today).

Scale - put every feature on the same footing, or the biggest unit wins (session 2).

Cluster - run the algorithm, understanding what it optimizes (sessions 3, 5).

Validate - interrogate the result: is the structure real, is k right, does it survive a re-run? (sessions 4, 9).

Name and act - turn cluster ids into personas with owners and campaigns; unnamed clusters are shelf-ware (session 7, capstone).

Notice validation comes BEFORE naming. Naming feels productive and is dangerously fun - the human brain will happily write a persona for a cloud of noise. Sequence is the discipline.

Real worldscikit-learn's own documentation ships a demo titled "Demonstration of k-means assumptions" whose entire point is showing the algorithm confidently mis-clustering data that violates its assumptions - wrong k, stretched blobs, unequal sizes. When a library's official docs dedicate a page to "here is our tool producing convincing nonsense", believe them.
Self-studyWhy this framing is worth being annoying about2 min▶

Segmentation results get presented to executives as facts about customers: "we have five types of customer." The honest sentence is "we chose to slice customers five ways, and here is the evidence the slicing is meaningful." The gap between those sentences is where budgets get wasted - campaigns built for segments that were artifacts of a unit choice or an arbitrary k. You will be the person in the room who knows which sentence is true. That is worth more than knowing another algorithm.

Everyone sorts

Hand-sort the pile 🥭 ★ 18 min · everyone clusters by hand

Before any algorithm touches the data, YOU be the algorithm. Below are twelve real rows from the lab's customer sample. Sort them into groups on paper - any number of groups you like. This exercise plants every intuition the next nine sessions formalize.

Copy the twelve. #101 R12 F21 M11800 · #102 R28 F9 M7200 · #103 R31 F1 M9600 · #104 R19 F3 M4300 · #105 R240 F6 M9100 · #106 R25 F24 M11200 · #107 R35 F8 M6800 · #108 R41 F1 M10100 · #109 R15 F2 M4800 · #110 R198 F7 M9400 · #111 R29 F10 M7400 · #112 R22 F2 M4100. (R days, F orders/yr, M cents.)

Sort them into groups. No rules - use your judgment. Give each group a nickname before moving on.

Write down WHY. For each group: which number(s) did you actually look at? Most people discover they sorted almost entirely on one column - notice which.

Compare with a neighbor (or re-sort tomorrow). Different groupings, both defensible - THIS is what "no ground truth" feels like. Note where you disagree and what evidence would settle it.

Now try to place #105 and #110. Big spenders who vanished months ago: are they "high value" (money says yes) or "gone" (recency says yes)? Your answer depends on how much weight recency deserves versus money - which is EXACTLY the question feature scaling decides, next session, and the cents column has been quietly deciding it for you.

Count your groups. Three? Five? Seven? You just chose k by intuition. Session 4 gives you the tools to defend that number to a skeptic.

✦ Keep the paper In the capstone you will re-meet these twelve customers with the full pipeline behind you. Comparing your hand-sort to the validated segmentation - and seeing where your eye beat the algorithm and where it fooled you - is the best 5 minutes of session 10.
Before next session

Homework 📝 ◐ 20 minutes

Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · The defining difference between supervised and unsupervised learning is...

Same table, answer column deleted. Everything else follows from that: no accuracy, no test-set ritual, and the burden of proof moves from the metric to the analyst.

2 · RFM describes each customer by...

The classic retail portrait - cheap to compute from any order table, obviously meaningful, and separating loyal from lapsed from one-off since the direct-mail era.

3 · You run k-means asking for 5 clusters on data that has no real structure at all. What happens?

k-means partitions - it never refuses. Ask for five, receive five, on anything including pure noise. Clusters are imposed by the algorithm and validated (or exposed) by you; session 9 runs this exact experiment live.

Coverage, honestly

What this session covered from the official universe

✓Andrew Ng ML Specialization course 3, week 1 - "What is clustering"the supervised/unsupervised split and clustering's job, taught through the Mango Lane brief
✓RFM segmentation (standard retail practice)the three-number portrait, its direct-mail lineage, and why feature choice is the analysis
◐Google ML Clustering course - overview + similarity framingsimilarity design introduced; the full treatment lands in session 2
◐scikit-learn "k-means assumptions" demonamed as evidence for imposed-not-discovered; run live in session 9

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

Session 1 cheat sheet

Unsupervised learningFinding structure in data with no answer labels. Nothing to grade against - judgment replaces the metric.
The three jobsGroup similar things (clustering) · compress features (dim reduction) · find co-occurrence (association rules).
What you loseAccuracy, the test-set ritual, and automatic failure alarms. Replacements: silhouette, stability checks, session 9.
RFMRecency (days since last order) · Frequency (orders/yr) · Monetary (avg order size). The standard retail portrait.
The planted trapMonetary arrived in CENTS from billing. Harmless-looking. Session 2 shows it silently owning the analysis.
The sticky noteThe algorithm always succeeds; only the analyst can fail. Five clusters of noise look exactly like five clusters of truth.
The workflowDescribe → scale → cluster → validate → name and act. Validation BEFORE naming - naming noise is dangerously fun.
The honesty railThe lab's "truth match" score exists only because the data is simulated. Real projects never get one - that is the job.