← Back to curriculum

Module 2 — Core machine learning

Welcome to Module 2

How Module 2 builds on Module 1, what you will learn, what to install before the spam project, and the lesson order.

~25 min read + exercises

Welcome to Module 2 — core machine learning

Before we begin

You finished Module 1: vectors, dot products, noise, gradient descent, and a hands-on regression project. You already know how a model updates its weights. Module 2 asks the next questions:

What kinds of ML problems exist? How do we know if a model is actually good? And how do we build something people can use?

Module 2 is still beginner-friendly — plain language, worked examples, one real project. No PyTorch yet. You will use Python to train a classifier and Node.js + MongoDB to serve it like a small production app.

Figure

Module 2 at a glance

Module 2 — core machine learning pathWork in order. Module 1 math intuition carries forward.1WelcomeModule 2 start2Supervisedlabels3Reg vs classoutput type4Fit & overfitgeneralize5Splitstrain/val/test6Metricsprecision7Quizself-check8Projectspam API
Six core lessons, quiz, then a spam classifier with API and database.

What Module 2 covers

TopicWhat you will understand
Supervised vs unsupervisedWhen you have labels vs when the model finds structure alone
Regression vs classificationNumeric predictions vs category choices
Overfitting / underfittingWhen a model memorizes instead of generalizes
Train / validation / test splitsHow to evaluate honestly without cheating
MetricsAccuracy, precision, recall — and when accuracy lies

Before you start

Required: complete Module 1 (or at minimum Lessons 1–4 + gradient descent intuition).

Nice to have: basic JavaScript/Node.js (for the project API). We provide copy-paste-ready snippets.

Install before the project:

  • Python 3.10+ with pip install scikit-learn numpy matplotlib
  • Node.js 18+ and MongoDB (local or Atlas free tier)

Lessons 1–6 are reading only. Lesson 8 (project) is where code matters.


How this connects to Module 1

Module 1 ideaModule 2 use
Vectors & lists of numbersEmail features become word-count vectors
Loss & gradient descentClassifiers still minimize error — different loss functions
Overfitting (intro in welcome)Now the central topic with fixes
Linear regression projectSame training loop spirit — new problem type (spam/ham)

Full course context

  1. Math & intuition — done
  2. Core machine learning ← you are here
  3. Neural networks
  4. PyTorch fundamentals
  5. Deep learning architectures
  6. Transformers & GenAI
  7. Agents & tool use
  8. Production & deployment

Ready?

Open the first technical lesson when this page makes sense:

Lesson 1 — Supervised vs unsupervised learning