← All Machine Learning Foundations modules

Module 1 — The Modeling Workflow

Start here · hands-on · about 25 minutes.

Almost every machine-learning project — a spam filter, a price predictor, a recommendation engine — follows the same general workflow. Once you have learned this workflow, each model in the course can be understood as a different set of choices within it. This module provides that framework, together with the single practice that keeps machine learning rigorous: evaluating on data the model has never seen.

The loop, end to end

A model is the result of a systematic, repeatable procedure comprising six stages. Select each stage below to read its description, then propagate a single example through the complete sequence.

This activity needs JavaScript. The six stages are: Data, Features, Model, Loss, Train, Evaluate.

Two ways to learn: supervised vs. unsupervised

The biggest fork in the road is whether your data comes with labels — the known correct answer attached to each example. Click each type below to see how its data looks and what the model does with it.

Supervised learning — every training example has a known label \( y \). The model learns a mapping from features \( x \) to label \( y \) (spam/not-spam, price, diagnosis). This setting is the focus of the majority of the course.
Unsupervised learning — no labels at all. The model finds structure in the features alone: groups (clustering, Module 6) or compact summaries (dimensionality reduction, Module 7).

Two types of supervised learning: regression vs. classification

Within supervised learning, the type of the target variable determines the appropriate class of model:

The workflow is identical; the two differ only in the form of the predicted value — a continuous quantity versus a discrete category. Identifying the task type correctly narrows the choice of model to a small set of appropriate candidates.

The one rule: never test on what you trained on

A model that has seen an example can simply repeat its answer — which demonstrates nothing about its ability to handle new cases. So before training, we partition the data into a training set (the model learns from this) and a test set (held back, used only once to estimate real-world performance). A model that performs well on the training set but poorly on the test set has overfit — it memorized the examples rather than learning the underlying pattern. Performing well on unseen data is called generalization, and it is the central objective of machine learning. This is the subject of Module 8.

All labeled data — split before any training Training set (~80%) Test set the model learns from this held back · scored only once
Because the model never trains on the test set, its accuracy there is an honest estimate of real-world performance.
AI anchor — this loop is everywhere A conversational assistant, the fraud-detection system on a payment card, and a photo-organization application that recognizes faces are each instances of this loop. They differ only in the features (pixels, words, transactions), the model (a decision tree, a neural network), and the loss function (the definition of a prediction error). When a machine-learning system fails publicly — exhibiting bias, brittleness, or confident errors — the cause can almost always be localized to a single stage of this diagram: inadequate data, a flawed train/test split, or an inappropriate loss function. The workflow therefore also serves as a systematic debugging checklist.

Sort the tasks

This activity needs JavaScript.

Why this matters next Every remaining module corresponds to one stage of this loop. Modules 2–5 examine different model families for the supervised case; Modules 6–7 cover the unsupervised branch; Module 8 develops the methodology of the evaluation stage — how to measure generalization honestly and detect overfitting. Keep this diagram in mind, and the entire course becomes a single framework applied eight times.
One-sentence summary: machine learning is a six-stage loop — data → features → model → loss → train → evaluate — where you choose supervised vs. unsupervised and regression vs. classification, and always judge the model on data it never trained on.