COMP328 Fundamentals of Machine Learning

Module 2 of 6

Supervised Learning

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.

3 units 27 tutorials 3 unit quizzes 1 assignment

Module at a glance

Units 3 — regression, classification, and evaluation
Tutorials 27 — nine per unit
Quizzes 3 — one at the end of each unit
Assignment 1 — Regression Modeling and Evaluation
Study time ~20 hours plus assignment work

Learning outcomes

What you will be able to do

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.

By the end of this module you will be able to

  • Distinguish regression from classification problems and choose the right framing for a given prediction task.
  • Fit simple and multiple linear regression models, and interpret their coefficients in the language of the problem domain.
  • Explain the least-squares objective and the role of the cost function in fitting a model.
  • Apply the sigmoid function to model binary outcomes as probabilities, and interpret the resulting coefficients as odds ratios.
  • Interpret decision boundaries and explain how they arise from the model’s parameters.
  • Evaluate classification models using confusion matrices, precision, recall, F1-score, and ROC/AUC — and choose the right metric for the problem.
  • Use cross-validation to estimate generalisation performance, and diagnose underfitting and overfitting through the bias–variance tradeoff.

This is where modelling begins

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.

Prerequisite reminder

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

Three units, twenty-seven 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.

Unit 4 9 tutorials · ~7 hours

Linear Regression

Predict continuous outcomes, understand the least-squares objective, and learn to read a regression model’s coefficients as statements about the world.

Unit 5 9 tutorials · ~7 hours

Logistic Regression

The same linear model, reshaped for yes/no questions. Probability, the sigmoid function, and the decision boundaries they produce.

Datasets

What you will work with

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.

House Prices Unit 4 · Regression
Predict sale price from size, location, age, and condition.
Student Grades Unit 4 · Regression
Predict final grade from study habits and prior performance.
Customer Churn Unit 5 · Classification
Predict whether a customer will leave a subscription service.
Loan Approval Unit 5 · Classification
Predict whether a loan application should be approved.

How to work through it

Build, interrogate, then evaluate

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.

  1. Read the tutorial

    Work through all nine sections in order. The worked examples show you the reasoning, not just the arithmetic.

  2. Run and modify the code

    Execute every cell, then change something: drop a feature, add an interaction term, shift a threshold. Watch what moves.

  3. Interpret before you evaluate

    Before Computing a metric, predict what it will be and why. If your prediction is wrong, you have found the thing worth learning.

  4. Finish with the unit quiz

    Each unit ends with a short quiz. Score it honestly before looking at the feedback.

Assessment

How this module is assessed

Module 2 carries three unit quizzes and the first substantial modelling assignment of the course.

  • Quiz 4 Linear Regression — 15 questions, counts toward your quiz grade Unit 4
  • Quiz 5 Logistic Regression — 15 questions, counts toward your quiz grade Unit 5
  • Quiz 6 Model Evaluation — 15 questions, counts toward your quiz grade Unit 6
  • Assignment 2 Regression Modeling and Evaluation Open

Assignment 1 is due in week 4

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.

Looking ahead

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.

👤