Margin
16 sessions · self-paced

Machine learning,
by hand, from scratch.

A 16-session course where every concept lands twice — once in the lesson, once in a Lab where you write code that runs. No black boxes.

Lessons that earn their length

Plain-language explanations that respect your time. No filler, no cliffhangers, no gamification.

A Lab in every session

Read for 10 minutes, then build for 15. Code runs in your browser — no setup, no environment to break.

Built by a small team

Founded by Neil Moudgil. The course is in active development and free for now. If it grows enough to need infrastructure, that may change.

The course

16 sessions, 5 phases.

Each session is a lesson and a Lab. They’re meant to be done in order, but you can drop in anywhere.

Phase 1The HookSessions 1–3
01 · The Hook

The Machines That Learn

30 min
02 · The Hook

Teaching Computers Like Teaching Kids

45 min
03 · The Hook

Data Is Everything

45 min
Phase 2Linear RegressionSessions 4–7
04 · Linear Regression

Drawing Lines Through Dots

50 min
05 · Linear Regression

How Wrong Are We?

50 min
06 · Linear Regression

Rolling Downhill

The marquee Lab. A blindfolded hiker, a real cost surface, the learning rate as a slider.

60 minfeatured →
07 · Linear Regression

Real-World Regression

50 min
Phase 3ClassificationSessions 8–10
08 · Classification

Cats or Dogs?

50 min
09 · Classification

When Models Lie

50 min
10 · Classification

Mini-Project: Titanic

75 min
Phase 4Neural NetworksSessions 11–13
11 · Neural Networks

Brains Made of Math

60 min
12 · Neural Networks

Going Deep

50 min
13 · Neural Networks

How It Actually Learns

60 min
Phase 5Modern EraSessions 14–16
14 · Modern Era

Learning Without a Teacher

50 min
15 · Modern Era

How ChatGPT Works

60 min
16 · Modern Era

Final Showcase

90 min
A note from me

I built Margin because the courses I learned from either skipped the math or skipped the code, and I needed both. It’s a small, opinionated object that exists because I wanted it to.

Read the full About →