
How the course is structured, what you need installed, how the hands-on lectures work, and how to get the most out of it.
What this course covers, the one dataset it builds on, and who it is aimed at. The spine is a single retail-banking churn problem carried from scoping to drift monitoring.
The ten stages of a machine learning project as an order of decisions rather than a list of topics, mapped onto the nine sections of this course and onto the handoffs where projects stall.
No statistic, because the famous ones have no source. Instead, the five specific places a finished model stalls - shown in the churn data this course uses, which contains all five.
A virtual environment, a pinned requirements file and a registered Jupyter kernel. The failure this prevents is a notebook running a different Python from the one you installed into.
Twenty-four thousand retail-bank customers, thirty columns, 8.62% churn. Six defect classes, three missingness mechanisms and two leakage traps, all deliberate and all reproducible.
How a sentence from a stakeholder becomes a decision, an owner and a target. Mapping the process first, and why letting the extract choose your question quietly decides the project.
Five signatures of a problem that is genuinely shaped like machine learning: scale, responsiveness, unmaintainable rules, industry precedent, and search with no benchmark.
Seven situations where a rule, a phone call, a cheap blanket action or fixing the process beats a model - and the checklist that catches them before you build anything.
The target is something you define, not something you find. Observation and outcome windows, late-arriving labels, constructed targets, and why 'closed within 90 days' beats 'unhappy'.
Writing a success test the project is allowed to fail. The three baselines, the GBP 40 against GBP 610 asymmetry, and why a model at the default threshold loses to offering everybody.
One scoping session, done badly and then properly. It ends with the four decisions the rest of the course is stuck with: the 90-day target, the base rate, GBP 40 against GBP 610, and the success test.
Where the thirty columns of the churn extract come from, warehouse against lake, and why the architecture decides which columns exist and when each one becomes knowable.
Batch, streaming and API collection, the target storage layer, and why a centralised data asset has to be built horizontally rather than for the one use case that funded it.
First contact with accounts_raw.csv. Five commands, wrong dtypes, three date formats and the trap in describe(). Profiling is a recurring habit, not a one-off step.
Six named checks run in a fixed order against accounts_raw.csv: types, duplicates, ranges, categories, date formats and whitespace. Each one finds a real defect in the file.
One sitting of exploratory analysis against accounts_raw.csv. Every rate compared to the 8.62% base rate, missingness treated as a signal, and the two columns that look far too good.
Two leakage traps in this file, of deliberately different difficulty, taking AUC from 0.715 to 0.991. The defence is one column of the data dictionary, and a split order the older material gets wrong.
What data preparation actually covers, the order the steps happen in, and the one rule that keeps it honest: every parameter you learn is learned on the training split only.
Three missingness mechanisms - MCAR, MAR and MNAR - each demonstrated on a real column of this extract, and the remedy each one actually justifies.
Run four imputation strategies against the three missing columns of the churn extract and measure what each one does to the distribution before you model it.
Ordinal, low-cardinality nominal and high-cardinality nominal columns, each encoded the way its structure justifies - and what happens when a category turns up that training never saw.
Why a feature matrix spanning 9,973 to 1 breaks distance and gradient based models, why it leaves trees untouched, and the two scaling bugs that appear in almost every public notebook.
Rebalancing a 10.6 : 1 problem lifts recall from 0.054 to 0.594 and leaves AUC untouched - and quietly destroys the calibration that any pound-denominated decision depends on.
Assembling Section 4 into one ColumnTransformer and Pipeline, so that fitting on the training split is the only thing the code is able to do. Contamination becomes structurally impossible.
Feature engineering as choosing the space the model draws its boundary in: the algorithm-driven half, the domain-driven half, and the rule that every feature must be computable at prediction time.
Turning the three column types that are not numbers into features: dates as clocks, 62 branch cities as a decision rather than a default, and one short complaint-note column handled proportionately.
Build eight features from dates, balances, categories and the complaint note, then measure each against a fixed reference with a fixed split. The deliverable is the harness, not the features.
Filter, wrapper and embedded selection, and the honest result behind them: dropping all eight pure-noise columns moves AUC by +0.004, inside the fold spread. It buys clarity and speed, not accuracy.
An honest experiment against eight columns of pure noise. The shadow test rejects all eight and confirms none, but leaves one real feature tentative. RFECV keeps 7 of 31 and costs 0.0118 of AUC.
What a feature store is actually for: training/serving skew, point-in-time correctness and reuse across teams. Plus the honest part - most teams, including this project, do not need one.
The first honest model on the churn extract: a stratified 75/25 split, logistic regression inside the section 4 pipeline, and an AUC of 0.715 that is 91.43% accurate and catches almost nobody.
The second target on the same rows: next_12m_margin_gbp, a mean of GBP 116.58 hiding -GBP 52.06 for churners against GBP 132.49 for stayers. MAE against RMSE, and 20.0% off the mean baseline.
Build the model that has no model in it: predict nobody churns. 91.38% accurate, recall 0.000, and GBP 315,370 of cost. Then price the opposite policy and read both against the logistic regression.
Five stratified folds put the same logistic regression at AUC 0.726 with a standard deviation of 0.0134 and a range of 0.710 to 0.746. The spread, not the mean, is what changes how you work.
Why searching hyperparameters is a multiple-comparisons problem, and a measured run on this pipeline that moved AUC by 0.0008 against a fold spread of 0.0134 - seventeen times smaller than the noise.
Twenty log-uniform random draws, then a five-point grid, both cross-validated on training rows only - and a measured gain of 0.0008 read against the 0.0134 fold spread.
The three ensemble families, and the measured result here: gradient boosting scores AUC 0.709 and a random forest 0.693, both below logistic regression's 0.715. Reported as measured, and explained.
Accuracy makes the do-nothing model look good on this problem. How to derive an evaluation metric from the decision and its costs, and why PR-AUC of 0.246 is the honest number here.
The confusion matrix priced in pounds. Precision 0.528 and recall 0.054 at the default threshold, why F1 is the wrong summary at a 15.25:1 cost ratio, and where the break-even threshold comes from.
Sweep every threshold from 0.02 to 0.80, cost each one in pounds, and take the minimum. The empirical optimum is 0.05, just below the theoretical break-even of 0.0656, and it saves GBP 105,750.
Isotonic regression costs 0.5% on a well-specified model - and then class_weight='balanced' pushes mean predicted probability to 0.430 against an actual 0.086 while AUC does not move at all.
Lead with the decision and the money, not the metric. Global against local explanation, the accuracy-interpretability trade-off, and what you must refuse to claim about a model's coefficients.
The exact linear-model Shapley identity, a summary plot for the global view, and one customer worked end to end: C1002788, base 0.0657, contributions of 4.2094, prediction 0.825 - and they churned.
Four deployment patterns, chosen by the decision the model serves rather than by the model. For this churn problem the answer is batch, and the reasoning is what generalises.
What you hand over is a contract, not a pickle: input schema, packaged preprocessing, output meaning, a reference fixture, failure behaviour and an owner. Training-serving skew is what it prevents.
Runtime performance, not model performance: define an SLA, drive load with Locust, read percentiles rather than means, and find the bottleneck - which is almost always the feature lookup.
Data drift moves the inputs; concept drift moves the relationship. On month 13 the model loses 0.061 AUC and the PSI of the feature responsible reads 0.001 - which is the whole argument.
Build two checks against accounts_month13.csv: per-feature PSI with the standard bands, and a delayed-label outcome check. The first misses the drift that matters; the second finds it.
Turning a drift alert into a decision: three trigger types, the difference between retraining and redevelopment, the label lag that governs the loop, and the named person who approves a promotion.
The brief: pick data that differs from the bank data on four axes, construct the target yourself, and deliver a sponsor memo alongside a reproducible repository.
A solution told through six wrong turns, each with its measured cost: the early split, the leaking column, the better algorithm that lost, rebalancing, the wrong metric, input-only monitoring.
What this course settled, which of the other thirteen courses breaks which assumption it made, and an honest statement of what the catalogue does not cover at all.
What you have actually built over this course, the habits worth keeping, and an honest word on what to do next.
This course contains the use of artificial intelligence.
Most machine learning courses hand you a clean file and a target column. The hard part already happened, off-screen, before you arrived - somebody decided what was worth predicting, argued the definition, found the data, and cleaned it. Then you fit a model, score it, and the course ends. That is not what the job looks like.
This course takes one problem - a retail bank wants to know which customers are about to close their current account, early enough to do something about it - and carries it the whole way. From the moment it is a vague request in a meeting, through defining what 'about to close' even means, to a model running in production with somebody watching it drift.
The data arrives broken, on purpose. Duplicate rows. Ages of minus one and a hundred and ninety-nine. Sixty-two branch cities spelled seventy-one different ways. Three date formats in one column. Missing values that are missing for a reason you can find in another column, which changes what you are allowed to do about them. You fix all of it, in an order that matters - and you find out why it matters when repairing things in the wrong order turns a hundred and eighty duplicates into thirty-eight.
There are two columns in the extract that will take your model's AUC from 0.715 to 0.991. Neither of them exists at the moment you need to score a customer. Finding them, and understanding why a savings balance called 'final' is a harder trap than a flag called 'retention call', is a section of this course rather than a footnote - because leakage is the failure that looks exactly like success, and nobody catches it by being careful.
Modelling is deliberately not the centre of gravity. Logistic regression scores 0.715 here and gradient boosting scores 0.709, and the cross-validated spread across folds is wider than the gap between them. That result is reported as measured, not as expected, and the course spends its time where the value actually is: on framing the target, on choosing a metric that matches the decision, and on the threshold. At the default 0.5 the model catches five per cent of the churners it should. Priced properly - a retention offer costs 40 pounds, a customer walking out costs 610 - the threshold moves to 0.05, recall goes to 0.818, and the campaign becomes cheaper than both doing nothing and offering to everybody. Those three numbers are what you put in front of a sponsor, not the AUC.
It finishes where real projects finish and most courses do not: the handoff contract with engineering, load and performance testing, monitoring that can tell concept drift from data drift, a retraining policy that says who decides and on what, and a capstone you run end to end on a dataset you have not seen.
Every hands-on lecture ships a lab you download and run - notebook, data extract, and the figures file the lecture quotes from. Nothing is asserted that could have been measured instead.