ML model evaluation mistakes that make good numbers meaningless
Nine errors behind great offline metrics and bad production models: random splits on time series, threshold-free metrics, tuning on the test set.
Library
Free to read. Filter by topic or search by title.
Nine errors behind great offline metrics and bad production models: random splits on time series, threshold-free metrics, tuning on the test set.
Splitting correctly stops the obvious leak. Target encoding, feature stores, label windows and proxy features leak anyway — how to find each.
The model is the small part. Training-serving skew, feature freshness, shadow deploys, drift detection, and monitoring that catches decay.
The geometry of embedding space: why you normalise, what dimensionality really buys you, and the anisotropy problem nobody mentions.
Queries, keys and values with real numbers. Why the scaling factor is sqrt(d_k), what multi-head attention buys, and how causal masking works.
A working decoder-only transformer in 120 lines. Pre-norm, residual streams, why the MLP is 4x wide, weight tying, stable initialisation.
Convolution forward and backward with no framework. The im2col trick that makes it fast, why the backward pass is a convolution too, and a net that trains.
An agent is a loop with tools and a stopping condition. Context growth, error handling, termination — and when to write a chain instead.
Tool calling fails at the interface, not the model. Schema design, descriptions, error contracts, and what MCP actually standardises.
Vibes do not scale and BLEU measures nothing you care about. Eval sets, LLM-as-judge without fooling yourself, and the biases that corrupt it.
Most RAG fails at retrieval, not generation. Build a golden set, measure recall@k, run chunking experiments, add a reranker when data says so.
Fine-tuning teaches behaviour, RAG supplies facts. A decision framework, the LoRA maths, real costs, and the cheaper ladder to climb first.
ANN search trades accuracy for speed. How HNSW graphs and IVF-PQ quantisation work, which knobs move recall, and how to choose an index.
Newsletter
Free essays on learning, Python, and ML — no account required. We’ll only email when there’s something worth reading.