Machine Learning Engineering
How do I turn data into a reliable machine learning system that learns useful patterns, generalises correctly, serves predictions in production, and remains measurable, reproducible and maintainable over time? Not a scikit-learn recipe book, not a PyTorch notebook, not a catalogue of algorithms.
A model is a set of assumptions with weights attached.
The weights are the easy part. What decides whether the system works is everything around them: what the target means, how the dataset was built, whether information from the answer leaked into the features, which metric maps to the business cost, what threshold turns a probability into a decision, whether serving computes the same features training did, and what happens when the world the model learned from changes. A learner who finishes this hears “accuracy is 94%” and does not nod. They ask on what dataset, split how, against which baseline, at which threshold — and what must stay true for that number to keep meaning anything.
The order is the argument. The decision decides the target; the target decides what data and what label; the data decides the split; the split decides whether the evaluation means anything; and everything after deployment is a check on whether those decisions still hold. Start in the middle — pick a model, tune it, report a number — and you get a result that is locally impressive and disconnected from anything that has to be true.
This is the model domain
Machine Learning Engineering does not own every layer it touches. It owns training, evaluation, serving and operating predictive models — and deep-links its neighbours rather than re-teaching them.
Data Engineering collects, moves, transforms, validates and serves the data — the feature pipelines, the point-in-time joins, the stream the model scores. Cloud and Computer Architecture provide the compute and explain why a GPU idles on a small batch.
Problem formulation, targets and labels, datasets and splits, leakage, features, models and how they learn, metrics that map to costs, evaluation that survives production, artifacts, inference, serving, monitoring, drift, retraining, and the MLOps practices that make all of it reproducible. No other domain answers what must stay true after deployment.
Backend exposes the model through an API, DevOps rolls it out, Observability measures it, Security defends it, and Agentic Engineering builds LLM and agent systems on top of it — prompting, retrieval, tools, memory and agent evals live there, not here.
Flagship experiences
The parts of this domain that are not reading. Every number on these pages comes from a real computation on synthetic data — a model actually trained, a tree actually grown — never a table pretending to be a run.
Raw data to feedback in eleven stages — then ask "what can go wrong?" and see the sixteen failure classes appear at the stage each one enters. Most of them are invisible offline.
A user opens the product. Trace the request through the frontend, backend, feature retrieval, transformation, model server, artifact, GPU, prediction, threshold, action, outcome and the future training set — with "go one layer deeper" at every stage.
A real logistic regression, trained by gradient descent on synthetic churn data. Inject a future timestamp, a target-derived feature, the same user in train and test, or global normalisation — and watch validation AUC beat the honest future-period AUC.
Slide the threshold and watch precision, recall, F1, the confusion matrix and the business cost move. Includes calibration, and the reason 99.9% accuracy on 0.1% fraud means nothing.
Polynomials actually fitted to noisy data: training error falls with degree, validation error is U-shaped, and more data narrows the gap.
SGD, momentum and Adam on three loss surfaces, with a learning rate you can push until it diverges. No optimizer wins everywhere, and the lab shows where each loses.
A 2-2-1 network as a computational graph: forward values and backward gradients on every node, one training step at a time, gradients checked against finite differences.
Grow a CART tree on 2D data one level at a time and watch training accuracy rise while held-out accuracy peaks and falls.
Vectors projected to 2D with the warning made concrete: the neighbours the plot shows are not the neighbours the model sees, and the lab measures the disagreement.
Six scenarios over twelve weeks with labels arriving three weeks late. Some need retraining. Some are a pipeline bug. One is drift with no quality loss at all — and retraining would be the mistake.
Ten controls — add leakage, corrupt labels, shift a feature, delay labels, kill the model server, traffic spike — and nine monitoring signals. Read the signals, name the cause, then see whether the readings alone could have told you.
Freshness, precomputability, live features, latency budget and volume decide batch, online, streaming or hybrid — with reasons, alternatives and what each costs.
The questions to answer before choosing a model, worked for subscription churn, with what goes wrong when each one is skipped.
Three decision trees — approach, offline-good-production-bad, should-we-retrain. Every leaf names why, the trade-off, the simpler baseline to try first, and how the approach itself fails.
Build a churn-prediction system from CSV to production, then absorb eight injected failures — none of which is fixed by retraining. Then a recommendation system with a feedback loop.
Four levels, with the cause unlabelled. Each one carries the trap: the fix that looks right — usually "retrain it" — and leaves the real problem in place.
What each question is really testing, what a strong answer sounds like, and the red flags that separate a recited algorithm from a working model of the system.
Learning modules
Thirty-nine modules, from what one training example represents to designing a fraud system whose labels arrive ninety days late.
What a machine learning system actually is — a pipeline from raw data to feedback — and the sixteen things that go wrong in it, most of which are invisible offline.
Start from the decision, not the model. What event to predict, when the prediction must exist, what action follows, what each mistake costs, and whether labels can be observed at all.
Supervised, unsupervised, semi-supervised and self-supervised — distinguished by where the learning signal comes from, and by what each can and cannot promise.
Regression, classification, ranking, clustering, dimensionality reduction and anomaly detection — what each one outputs, and why a visually separated cluster is not a business segment.
Filtering, joining, labelling and feature creation each introduce bias or leakage. What one training example represents, and how sampling decides what the model can learn.
Train, validation and test as three different jobs, and the split strategy — random, temporal, grouped, stratified — as the decision that decides whether the metric means anything.
The deepest module. Target, temporal, entity, preprocessing, feature and evaluation leakage: every way information from the answer reaches the model, and why each makes offline metrics lie.
Aggregation, bucketing, normalisation, encoding, temporal and interaction features — each a transformation that must be reproduced identically at serving time.
Hand-engineered features against learned representations, feature selection, and importance methods — with the warning every one of them needs: importance is not causality.
Rule, mean predictor, majority class, linear model, simple tree. Mandatory before anything complex, because a model that does not beat a useful baseline has not earned its cost.
Linear and logistic regression as the models everything else is compared to: coefficients, residuals, the sigmoid, and the threshold that turns a probability into a decision.
The confusion matrix and everything derived from it — precision, recall, F1, ROC AUC, PR AUC, calibration — each with its business reading and the case where it misleads.
MSE, RMSE, MAE, R² and the caveats on MAPE: what each punishes, what each hides, and how to choose one from the cost of being wrong.
Business metrics against model metrics, offline against online, cross-validation and its temporal variant, slices — and the rule that the test set is touched once.
Underfitting, overfitting, learning curves, regularisation and early stopping — the mechanics of why a model that memorised the training set looks perfect until it meets new data.
Decision trees, random forests and gradient boosting — how each learns, why boosting fits residuals, and XGBoost and LightGBM as implementations rather than as answers.
Three mental models, their assumptions, strengths and limits — taught as ways of thinking about data rather than as API calls.
The neuron, activations, the forward pass, loss functions and backpropagation on a computational graph — the mechanism every deep learning framework hides.
Gradient descent, SGD, momentum and Adam; epochs, batches and steps; learning rate and batch size trade-offs; vanishing and exploding gradients; normalisation.
Discrete entities as dense vectors — words, users, products, documents — cosine similarity, and why a 2D projection distorts the geometry it claims to show.
Convolutions for spatial structure, recurrent models for sequences, and transformers: tokens, embeddings, self-attention, positional information.
Encoder and decoder families, pretrained models reused across tasks, transfer learning, fine-tuning and parameter-efficient adaptation — at the level of what changes and what it costs.
Hyperparameters against learned parameters; grid, random and Bayesian search; the budget; and the rule that nothing is ever tuned on the test set.
Forecasting, trend and seasonality, horizon, anomaly detection — and validation that respects time, because a random split on temporal data is leakage.
Candidate generation and ranking, collaborative and content-based filtering, cold start — and feedback loops, where the model changes the data it will be trained on next.
What every run must record, why random seeds alone do not reproduce anything, and versioning datasets, labels, features and models so lineage can be traced.
What a model artifact contains, the registry lifecycle from candidate to archived, and promotion judged on quality, latency, memory, cost and robustness rather than one offline score.
Batch, online and streaming inference, how to choose between them from freshness, latency and volume, the serving architecture, batching, and CPU against GPU.
Identical weights can fail if the features differ. Skew, feature stores as optional infrastructure, point-in-time correctness, freshness, latency breakdown and fallbacks.
Parallel compute, matrix operations, memory bandwidth and VRAM; quantization from FP32 to INT8; pruning and distillation; and what inference actually costs.
Data, model, tensor and pipeline parallelism, gradient synchronisation with all-reduce, checkpointing for recovery, and the cost of a training run.
A dedicated stack: data and feature tests, training smoke tests, model invariants, serving contracts, robustness — because a green unit test suite says nothing about a model.
Subgroup performance with no universal fairness metric, explanations that are approximate, privacy as design, and the line between predicting Y and causing it.
Data, feature, prediction and concept drift taught separately; drift that is not failure; ground truth that arrives weeks late; and performance decay diagnosed rather than assumed.
Retraining as a decision rather than a schedule, champion/challenger, shadow, canary, A/B — and rollback and fallback, which every serving system needs before it needs a second model.
Tracing one request through features, model version, prediction, decision and outcome; logging what is necessary and safe; and debugging an incident from the business metric down.
The practices that make ML reproducible, testable, deployable and observable — CI, CT and CD distinguished, platform capabilities, cloud primitives before vendors, cost.
Poisoning, artifact integrity, sensitive-data leakage, adversarial inputs, supply chain and inference abuse — defensively, and at the level of what to validate and trust.
The questions to ask before drawing boxes, then recommendation, fraud, churn and search ranking designed end to end — and the boundary with Agentic Engineering.
Reference
For when you already know roughly what you are looking for.
Levels, each unlocking something you can actually build and defend.
The searchable index: what a problem sounds like in a standup, and what to think when you hear it.
The pairs people genuinely confuse — precision and recall, ROC and PR AUC, data drift and concept drift, shadow and canary — with the confusion named, plus model families compared without a winner.
Don't delegate understanding
The point of the domain, stated plainly.
Use all of them. Rebuilding them by hand is not the lesson. But understand what data the model learned from, what objective it optimised, what assumptions it depends on, and what happens when those assumptions stop being true — because when one of these abstractions leaks, and each leaks in a characteristic way, you want to be debugging a system you have a model of rather than one you have been trusting.