How an ML Project Runs

From a business question to a monitored model

40 min · interactive lesson with runnable code and 5 graded exercises.

What you'll be able to do

  • Frame a business problem as an ML task with a target and a metric
  • Always start from a baseline and beat it honestly
  • Split data correctly and spot leakage
  • Explain what deployment and monitoring add after training

Frame the problem

Business question → ML task

Before any model: what decision will the prediction change, what exactly is predicted, and how will you know it worked?

Data and labels

Where most of the time goes

  • Labels: where does the target come from, and is it reliable?
  • Grain: one row per what (customer, transaction, day)?
  • Coverage: missing values, duplicates, time range.
  • Point in time: every feature must be known before the moment you predict.

Baseline first

The number to beat

A baseline is the simplest reasonable prediction: the majority class, the average, “same as last week”. If a model can't beat it clearly, it isn't adding value. Run this end to end:

Validation and leakage

An honest test

Leakage is information in training that won't exist at prediction time — and it makes a model look great offline and fail in production.

  • A feature computed after the outcome (“number of cancellation emails sent”).
  • Scaling or imputing with statistics from the whole dataset before splitting.
  • Random splits on time series — the model peeks at the future.
  • The same user appearing in train and test.

Deploy

Where value starts

Deployment brings software concerns: versioned models (a registry like MLflow), reproducible training, tests, latency budgets, rollbacks — and an A/B test to prove the model helps the business metric.

Monitor and retrain

Models decay

The world changes: new customers, new products, new fraud patterns. Data drift (inputs change) and concept drift (the input→output relationship changes) slowly erode quality.