Module 1 — The Modeling Workflow
Focus questions
Keep these questions in mind as you work through the module. Answer them in your guided notes, and use them to decide what belongs on your reference card.
- In your own words, what role does each of the six stages (data, features, model, loss, train, evaluate) play, and which stages change when a different model is chosen?
- For a task such as estimating a patient's blood pressure from age and weight, how would you decide whether it is supervised or unsupervised, and whether it is regression or classification?
- Why is accuracy measured on the training set an untrustworthy estimate of real-world performance, and what does a large gap between training and test accuracy reveal about a model?
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:
- Regression predicts a number on a continuous scale — temperature, price, hours. (Module 2.)
- Classification predicts a category from a fixed set — spam/ham, cat/dog/bird, pass/fail. (Modules 3–5.)
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.
Sort the tasks
This activity needs JavaScript.