Linear Regression
Predict continuous outcomes, understand the least-squares objective, and learn to read a regression model’s coefficients as statements about the world.
Module 2 of 6
Module 2 is where you train your first models. Over three units you will fit linear and logistic regressions, learn to read what their coefficients actually mean, and build the evaluation habits that separate a model that works from one that merely scores well on paper.
Learning outcomes
By the end of Module 2 you will have built, interpreted, and evaluated predictive models on real datasets — and you will know why each evaluation metric exists.
Module 1 gave you the concepts, the data skills, and the Python tooling. Module 2 puts them to work. From Unit 4 onward, every tutorial involves fitting a model to data and interpreting the result — there is no purely theoretical unit.
This module assumes you have completed Module 1, or that you are already comfortable with the Python data stack (NumPy, Pandas, Matplotlib, Scikit-Learn). If any of that is unfamiliar, work through Module 1, Unit 3 first.
Units & tutorials
Unit 4 builds the regression foundation. Unit 5 extends the same ideas to classification. Unit 6 teaches you how to tell whether either of them actually works.
Predict continuous outcomes, understand the least-squares objective, and learn to read a regression model’s coefficients as statements about the world.
The same linear model, reshaped for yes/no questions. Probability, the sigmoid function, and the decision boundaries they produce.
A model is only useful if you can say how well it performs — and on what. Metrics, validation strategy, and the bias–variance tradeoff.
Datasets
Every unit in this module is anchored to a concrete prediction problem. The same datasets reappear in Unit 6, where you evaluate the models you built in Units 4 and 5.
How to work through it
Module 2 rewards a different habit than Module 1. Here, the goal is not just to run the code but to predict what it will do before you run it — and to explain the result after.
Work through all nine sections in order. The worked examples show you the reasoning, not just the arithmetic.
Execute every cell, then change something: drop a feature, add an interaction term, shift a threshold. Watch what moves.
Before Computing a metric, predict what it will be and why. If your prediction is wrong, you have found the thing worth learning.
Each unit ends with a short quiz. Score it honestly before looking at the feedback.
Assessment
Module 2 carries three unit quizzes and the first substantial modelling assignment of the course.
If you have not yet submitted Assignment 1: Data Exploration and Preparation, note that its deadline falls in the first week of this module. Module 1’s content covers everything Assignment 1 asks for, so it is worth finishing before you begin Unit 4.
The evaluation vocabulary you build in Unit 6 — precision, recall, F1, ROC/AUC, cross-validation — is used in every remaining module. Treat Unit 6 as the toolkit you will keep reaching back into, not as a unit to get through quickly.