learn-feature-engineering-with-phoebe / Practitioner session 1 of 10
Learn Feature Engineering with Phoebe · Practitioner track · Session 1 of 10

What a feature actually is

A column is what the database gives you. A feature is what the model can learn from - and the gap between the two is where most of the winnable performance in applied machine learning lives. Tonight you meet that gap on Lumen's checkout data: same model, same rows, and a held-out AUC that climbs from 0.500 to 0.813 purely because of how the columns were shaped. Nothing in this course changes the algorithm. Everything changes the inputs.

🟢 Practitioner track DS · analysts · ML engineers Python · live workbench on key pages Start here
0-3 · Welcome 3-18 · Column vs feature, the model's-eye view 18-42 · Build-along: climb the ladder 42-45 · Q&A
Part 0

How this track works

Ten sessions, one running case: Lumen Skincare's checkout data - 40,000 sessions, a 3.2% conversion rate, and a pile of raw columns. The intro-ML course trained a model on it; the model-evaluation course judged the result. This course owns what sits between them: turning columns into features, and not fooling yourself while you do it. b2-b4 build the craft (numeric transforms, encoding, datetime), b5 is the leakage session everything else defends against, b6-b8 go deeper (interactions, missing data, selection), b9 bridges to embeddings, and b10 ships a written feature spec you can hand to a colleague.

Live - presented in session Self-study - read after class ▶ Live workbench - a real model, trained in your browser Official sources covered
★ What you walk out with today A working definition of "feature" you can defend, the model's-eye view of a table (it sees numbers, nothing else), the five feature groups that make up the rest of this course, and the habit the whole track is built on: never read a training score without asking what the held-out score says.
Part 1 · covers Google MLCC "feature vectors", Kaggle Learn lesson 1

The model does not see your table 7 min live

Google's glossary is precise: feature engineering is "the process of determining which features might be useful in training a model, and then creating those features from raw data." The key word is creating. Your model never sees channel = "email" or a timestamp - it sees a vector of floating-point numbers. Everything else is a translation you perform, and every translation is a decision about what the model is allowed to notice.

RAW ROW channel: "email" signup_date: 2025-11-03 prior_30d_spend: 182.40 pages_viewed: 6 postal_code: 048624 support_note: "gift?" YOU TRANSLATE encode · scale · derive WHAT THE MODEL GETS [1, 0, 0, 0, 0, 0, 0, 0, 0, 1.82, 1.20, 0.61, 1.0, 0.83, 0.0, ... ] numbers only - no strings, no dates, no meaning Whatever you fail to translate, the model cannot use. Whatever you translate badly, it learns badly.
🔍 Click to zoom - the translation step nobody sees on the dashboard
LiveWhy "just throw the columns in" fails4 min▶

Three concrete failures, all of them common, all of them fixed in this course:

  • Strings-as-integers. Google's crash course puts it perfectly: if you index categories and hand them over raw, "the model would treat the indexed values as continuous floating-point numbers. The model would then consider 'purple' six times more likely than 'orange.'" That is not a subtle bias - it is arithmetic on nonsense (b3).
  • Buried signal. A signup_date holds tenure, weekday, seasonality, recency. As a timestamp it holds none of them, as far as a linear model is concerned (b4).
  • Invisible relationships. Spend matters more for returning customers than new ones. No single column carries that; the interaction has to be built (b6).
Three ways "just throw the columns in" actually fails 1 · Strings as integers hand indexed categories over raw 1 6 orange purple "purple" reads as 6 x "orange" arithmetic on nonsense (b3) 2 · Buried signal signup_date: 2025-11-03 one opaque timestamp tenure weekday seasonality recency 3 · Invisible relationships spend matters more for returning customers spend returning spend x returning no single column holds it (b6) Google: a model handed indexed categories would "consider 'purple' six times more likely than 'orange'." Each failure is a translation nobody made - and each one has its own session: b3, b4, b6.
🔍 Click to zoom - the model cannot use what you never translated
Real world

Where practitioners actually spend the time. Google's crash course states it flatly: "ML practitioners spend far more time evaluating, cleaning, and transforming data than building models." The model-selection debate that eats a planning meeting is usually worth less than one afternoon of feature work - and this course exists because the afternoon is the part nobody teaches.

Self-studyGoogle's feature rules, condensed3 min read▶

From "Rules of Machine Learning" - the ones that shape this whole track:

  • Rule 17: "Start with directly observed and reported features as opposed to learned features." Hand-crafted first; the embeddings bridge comes in b9, not before.
  • Rule 19: "Use very specific features when you can." Specific beats clever.
  • Rule 20: "Combine and modify existing features to create new features in human-understandable ways" - discretization and crosses, which are b2 and b6.
  • Rule 21: "The number of feature weights you can learn in a linear model is roughly proportional to the amount of data you have." More columns is not free (b8).
  • Rule 22: "Clean up features you are no longer using." Feature debt is real debt.
Part 2 · the map of the whole track

Five groups, one ladder 6 min live

Everything you will build in the next nine sessions falls into five groups, and tonight's workbench turns them on one at a time so you can watch each one earn its lift. The point is not the numbers - it is that the numbers move at all while the algorithm sits perfectly still.

One ladder, five groups, and an algorithm that never changes 0.80 0.70 0.60 0.50 HELD-OUT AUC → 0.500 0.696 0.785 0.806 0.812 0.813 0 · nothing 1 · raw numerics 2 · encoding 3 · datetime 4 · interactions 5 · selection b2 b3 b4 b6 b8 Encoding is the biggest single jump, at +0.089, from columns the model could not read at all. The rises shrink after that, and the shrinking is information rather than disappointment.
🔍 Click to zoom - the numbers move while the algorithm sits perfectly still
GroupWhat it does to the tableSession
Raw numericsTake the numbers as-is, then decide how to scale, bin, or tame their shapeb2
EncodingTurn categories into numbers a model can hold without inventing an orderb3
DatetimeBreak a timestamp into the things it actually means: tenure, weekday, recencyb4
InteractionsBuild the relationships between columns that no single column carriesb6
SelectionRemove what is noise, which is a feature decision toob8
LiveThe sixth toggle, and why it is different4 min▶

Tonight's workbench has a sixth lever, drawn with a dashed border: target leakage. It is not a feature group - it is the failure mode this entire course is arranged to prevent, and you will press it deliberately in a moment.

sklearn's own documentation defines the problem exactly: "Data leakage occurs when information that would not be available at prediction time is used when building the model. This results in overly optimistic performance estimates... and thus poorer performance when the model is used on actually novel data."

Read the middle clause twice. Leakage does not announce itself with an error. It announces itself with a better score - which is why it survives code review, demo day, and the launch meeting, and only fails once it is somebody's production system.

Self-studyWhat a held-out set is protecting you from3 min read▶

Every score in this course comes in a pair - training and held-out - and the workbench deliberately hides the held-out number until you press a button. That friction is on purpose. The pattern to internalize:

  • Training score answers "did the model fit what it saw?" It is always available, always flattering, and never sufficient.
  • Held-out score answers "will this work on rows it has never met?" It is the only one connected to production.
  • The gap between them is the diagnostic: a small gap means honest work; a sudden large gap means you have taught the model something it will not have when it matters.

The intro-ML course made this split; this course will try, repeatedly, to break it on purpose so you recognize the shape when it happens by accident.

Demo 1 of 2

Climb the ladder ★ 14 min · everyone runs it

Below is a real logistic regression, trained by gradient descent in your browser on 1,800 Lumen sessions and scored on 1,200 it never saw. Start with every lever off, then switch on one group at a time and press Score on held-out after each. The algorithm never changes. Only the columns do.

All levers off: 0.500. No features, no model - a coin flip. Everything above this line is something you build, not something the algorithm finds.

+ Raw numerics: 0.696. Spend and pages viewed carry real signal - and they were already sitting in the table, costing nothing but the decision to use them.

+ Encoding: 0.785. The single biggest jump on the ladder, and it comes from columns the model previously could not read at all (b3).

+ Datetime: 0.806. Tenure and weekend were inside signup_date the whole time, invisible until decomposed (b4).

+ Interactions: 0.812. Spend-times-returning is a relationship no column holds alone (b6).

+ Selection: 0.813. Dropping the noise column barely moves the score - and that is the lesson: selection buys simplicity and stability more than accuracy (b8).

How to read the workbench Training AUC is always visible; held-out stays masked until you ask for it. AUC 0.5 is random, 1.0 is perfect, and on a rare-event problem like 3.2% conversion, 0.8 is a genuinely useful model. The data is synthetic Lumen; the model, the split, and every number are real and computed live.
Demo 2 of 2

Now break it on purpose ★ 8 min · everyone runs it

With all five honest levers on, switch on target leakage and read the training score first. Then press Score on held-out. This is the most important thirty seconds of the course.

Training AUC jumps to 0.967. In a normal week this is the moment you message the team. The feature is post_purchase_flag, and it was sitting right there in the warehouse.

Press Score on held-out: 0.789. A gap of 0.179 - and look closer, it is BELOW the 0.813 you had before adding it. The leak did not just fail to help; it made the model worse.

Understand the mechanism: post_purchase_flag is written after the sale. In your historical table it is filled in. At prediction time - the moment that actually matters - it is empty. The workbench scores held-out rows the way production would, so the column arrives blank and the model's best feature evaporates.

Say the rule out loud: a feature is only a feature if it exists before the thing you are predicting.

Real world

sklearn documents this with a number that should scare you. In their own worked example on completely random data with no signal at all, running feature selection before the train/test split produced 0.76 accuracy. Done honestly, the same pipeline scored 0.50 - and 0.43 under cross-validation. Leakage manufactured 26 points of accuracy out of pure noise. If a result looks too good, this is the first thing to check, not the last.

Homework

Try it yourself - this week ◐ 20-30 min total

Source material

Official sources covered

This track teaches the working core of the canonical feature-engineering sources - sklearn's preprocessing, pitfalls, and selection guides, Google's crash-course data modules and Rules of ML, and Kaggle Learn's feature-engineering course - with a live workbench on the key pages. Certificates and graded exercises stay with the official providers (linked each session). This page covers:

✓Google MLCC - feature vectors + "Qualities of good features" framingParts 1-2 · normalization and binning land in b2
✓Kaggle Learn "Feature Engineering" - lesson 1, What Is Feature EngineeringThe column-vs-feature frame · mutual information in b8
◐sklearn "Common pitfalls" - the leakage definitionPreviewed in Demo 2 with the 0.76-on-noise result · the full session is b5
◐Google "Rules of Machine Learning" - rules 17, 19-22The feature doctrine · governance and Rule 29 in the leader track
◐Lumen canon (learn-intro-ml) - the dataset and the model under improvementReused, never re-derived · this course adds postal_code, signup_date, support_note
Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · Why can you not hand a model the column channel = "email" as an integer index?

Google's crash course says it exactly: the model "would then consider 'purple' six times more likely than 'orange.'" The index imposes an order and a magnitude that the categories never had. Encoding (b3) is how you avoid inventing that arithmetic.

2 · The leakage lever pushed training AUC to 0.967 and held-out AUC to 0.789. What made the held-out score collapse?

This is the production failure in miniature. sklearn's definition names it precisely: information "that would not be available at prediction time." The historical table has the column filled in; the live request does not.

3 · On the ladder, the algorithm never changed. What does that demonstrate?

That is the thesis of the whole course. Same estimator, same rows, same split - every point of improvement came from translating raw columns into things the model could actually use.

Practitioner session 1 cheat sheet · pin this

Feature vs columnA column is stored; a feature is created. "Determining which features might be useful, and then creating those features from raw data" (Google glossary).
The model's-eye viewIt receives a vector of floats. No strings, no dates, no meaning. Whatever you fail to translate, it cannot use.
The five groupsRaw numerics (b2) · Encoding (b3) · Datetime (b4) · Interactions (b6) · Selection (b8). The rest of the track, in order.
The ladderHeld-out AUC 0.500 → 0.696 → 0.785 → 0.806 → 0.812 → 0.813. Same algorithm throughout.
Leakage in one lineInformation "that would not be available at prediction time" (sklearn). It shows up as a BETTER score, which is why it survives review.
The leak's shapeTrain 0.967, held-out 0.789 - worse than the 0.813 without it. sklearn's noise experiment: 0.76 leaked vs 0.50 honest.
The pair ruleNever read a training score alone. Small train-holdout gap = honest work; sudden large gap = you taught it something it will not have.
Running caseLumen Skincare checkout sessions, 3.2% conversion. Plus this course's additions: postal_code, signup_date, support_note.