← All courses

Course 4 · AI in Action · about 12 min

Start with the problem, not the model

By the end of this course you can turn a real problem into a machine learning project, build its pipeline, and judge it with the right metric.

Most failed AI projects fail before any model is trained: they solve the wrong problem. Before you touch data, answer four questions:

If a fixed rule solves it, you don't need machine learning at all.

Try itIs machine learning a good fit?

CheckWhat should come first in an AI project?

Step 2

Features and the leakage trap

Features are the inputs a model sees, like a customer's age, plan or number of support calls. Turning raw data into useful features is called feature engineering. A raw date, for example, becomes "day of the week" or "days since last purchase".

The most dangerous mistake is data leakage: a feature that secretly contains the answer, or information you won't have at prediction time. The model looks brilliant in testing and fails in real use.

PredictA model predicts whether patients will return to hospital within 30 days. It scores 99%. One feature is "readmission billing code". What's wrong?

CheckWhat is a feature?

Step 3

The pipeline

A pipeline is the repeatable chain of steps from raw data to a running model. Writing it as code means you can rerun everything when new data arrives, instead of clicking through it by hand.

The last step never ends: the world changes, so the data a model sees in use slowly drifts away from its training data. This is called data drift, and it is why models need monitoring.

Try itPut the pipeline in order

Tap the first step, then the next.

CheckWhy monitor a model after it is deployed?

Step 4

Measure what matters

Imagine 1,000 patients, of whom 10 have a rare disease. A model that always says "healthy" is 99% accurate and finds nobody. Accuracy alone can lie when one outcome is rare.

Which matters more depends on the cost of each mistake.

Try itCompare three disease-screening models

Each model looked at the same 1,000 patients, 10 of them sick.

PredictWhich model would you use for a first screening, where flagged patients get a cheap follow-up test?

CheckFor disease screening, which metric usually matters most?

Step 5

Match the problem to the approach

Most real problems fit one of four patterns:

Try itName the pattern

CheckYou want to catch rare, unusual bank transactions but have almost no labelled fraud examples. Which approach fits?

Step 6 · Recap

What you learned

Quick reviewThree questions from memory. No scrolling back.

In Course 5 you turn skills like these into portfolio projects that employers notice. Mark this course complete below when you're ready.