Module 1: Introduction and Framing

This module introduces the foundational concepts of machine learning: functions, models, and prediction. You will learn how to represent real-world problems as functions that map inputs to outputs, explore how such functions can be tested and evaluated, and understand the importance of generalization to new data.

Learning Objectives

  • Define key concepts in machine learning, including function, model, generalization, and overfitting.
  • Identify input/output relationships in a variety of functions and machine learning tasks.
  • Apply logical and statistical testing strategies to evaluate the performance of functions.
  • Evaluate model performance using metrics such as loss, error, and accuracy on both training and test data.
  • Formulate a machine learning problem by clearly defining inputs, outputs, and evaluation criteria.
  • Explain the purpose of baseline predictors and their role in assessing model performance.
0 of 8 stages complete
1 · Watch

The module in two minutes

An animated overview of the module’s through-line. Watch it before the lecture — it is the map, not the territory.

Lecture shorts

Short lectures and code walkthroughs from the instructor that reinforce this module. Some open partway into a longer video — that chapter is the part matched to this module.

ML Foundations, parts 1–3 — what ML is, statistics→ML, the shapes of data (to 3:39)
Concept: three matrix structures
2 · Listen

Orientation audio

What a model actually is, why held-out data is non-negotiable, and how to walk this module.

3 · Read & play

The through-line

Machine learning starts with a claim modest enough to miss: a prediction is just a function. Something takes inputs — square footage, a pixel grid, last month's sales — and returns an output. Programming writes that function by hand. Machine learning fits it from recorded input–output pairs, which is why the field obsesses over data before it obsesses over algorithms.

The lecture builds this up in six moves. Functions first, as pure Python. Then data as (x, y) pairs, then a model: a function with free parameters, whose values are chosen to fit the pairs rather than typed in by a person. Fitting immediately raises the question the rest of the course keeps answering — how good is the fit? — so evaluation enters in the same breath: a loss number, not a feeling.

The last two parts contain the week's real lesson. If you evaluate a model on the data it was fit to, you reward memorization, and memorization fails on the first example it hasn't seen. The train/test split is the field's defense: hold data back, fit on one part, judge on the other. The gap between training error and test error has a name — overfitting — and you will watch it happen on purpose in the notebook.

Hold on to the vocabulary this week installs: model, parameters, loss, generalization. Every module after this one is a variation on those four words.

Figure · Fit vs. memorize

Ten training points, one dial: polynomial degree. The fit is least squares — loss-minimization, exactly as in lecture. Raise the degree, watch training error fall. Then reveal the held-out points.

Training error falls monotonically with degree — evaluating on the data you fit to rewards memorization. The held-out error falls, bottoms out, then climbs as the wiggles start chasing noise. That U-shape is the entire reason the train/test split exists.

Key concepts

  • Function: A mapping from inputs to outputs
  • Model: A learned approximation of a function
  • Generalization: A model's ability to perform on unseen data
  • Overfitting: When a model memorizes training data but fails on new data
  • Train/Test Split: Dividing data to evaluate generalization
  • Baseline: A simple reference model for comparison

From the prerequisites

  • Linear algebra: functions, vectors, coordinate space
  • Basic statistics: mean, error, accuracy
4 · Code

The lecture notebook

Six parts, from scratch before any framework. Run every cell; change things and rerun — the notebook is the lecture.

In Colab: File → Save a copy in Drive keeps your work.

5 · Practice

Exercise

Attempt the exercise before opening the solution — the attempt is where the learning happens.

6 · Check

Knowledge check

The quiz is self-graded and open-book. If a question surprises you, the corresponding lecture part is the fastest fix.

7 · Go deeper

Reference and discussion

8 · Done

Finish the module

Complete the stages above, then claim the finish here.