AI Engineering
/

ML & Data Foundations

ML & Data Foundations

Split data correctly, spot leakage, and respond to drift.

Start topic

Use training, validation, and test splits correctly, recognize leakage and misleading metrics, and evaluate models over time.

3 questions

Questions

Easy

Easy
Conceptual

1.5 h

Explain what training, validation, and test splits are each for, then repair a fictional marketplace's evaluation plan by choosing a split that matches how its model will be used.

Medium

Medium
Hands-on

3 h

Implement an audit that flags leaky features, preprocessing, time splits, selection, and mismatched reports, predict its findings on five fixture experiments, and diagnose why a churn model that looked excellent offline failed after launch.

Hard

Hard
System Design

4 h

Design rolling-origin backtests, capacity-bound metrics, label-delay handling, and drift monitoring for a synthetic card-fraud model whose chargebacks arrive weeks late, then decide whether to promote, shadow, or hold a retrained candidate.

What you will be able to do

  • Explain what the training, validation, and test splits are each for, and which decisions each one may inform
  • Explain why a test set stops giving an unbiased estimate once it informs any decision, and why every preprocessing step is fitted on training data only
  • Choose a random, stratified, grouped, or time-based split from how the model will be used, and handle rows whose label is not final yet
  • Use k-fold cross-validation when data is small, and read the average and spread of the fold scores
  • State what a single test score does and does not establish
  • Explain what leakage means for a model and how it differs from data leakage in security
  • Check that every feature is computable at the prediction cutoff and that fitted preprocessing sees only training rows
  • Place evaluation splits after the last training label is final, and keep model and threshold choices on validation
  • Report accuracy against the majority-class baseline, with precision, recall, and their denominators, on the split's own population

Before you start

Suggested, not required.

Topic boundaries

This topic covers data splits, leakage, misleading metrics, and evaluation over time for any model. Evaluation & Observability covers evaluation specific to LLM applications.

Related on CodeSnatch