This club teaches the math behind machine learning, not coding. YCDSB policies: Student Use of Technology (311) · Acceptable Use of Technology (408)Math, not coding. YCDSB Policy 311 · 408

The math behind machine learning, from y = mx + b to ChatGPT.

Margin is a 16-session course for high school students. Each session has a lesson to read and an interactive where you move the numbers and see what the math does. You can try the first one below.

Exercise 00Drag the line. Fit the dots.
loss = 11.68 · target < 1.00

That instinct (move the thing, watch the error, move again) is gradient descent. The entire course is turning it into math you can see and use.

fig. 0: least squares, by feelno installs · no account · this is the actual product
Worked notes

What you just did, on paper

1.

You moved two numbers

The line is y = wx + b. Dragging the handles changed the weight w and the bias b, the same two numbers a model tunes.

2.

A number graded you

The loss measured how wrong the line was, every frame. You steered by it without thinking. That number is the loss function, the heart of all training.

3.

You minimized it

Nudge, check, nudge again. Done by a formula instead of a hand, that’s gradient descent. It trains everything from this line to ChatGPT.

The method

Every concept lands twice.

First: the lesson

Rolling downhill

Imagine standing on a hillside in fog. You can’t see the valley, but you can feel the slope under your feet. Step downhill. Re-check. Step again. The slope is the derivative; the stepping is learning.

Then: try it yourselfyou start herethe valley
how wrong: 4.00✓ bottom found
Contents

16 sessions, five phases.

Figures

Some ideas you have to poke.

Alongside the sessions: standalone simulations. No progression, no score. Just the machinery, with the cover off.

PrerequisitesWhat you need
  • a browser (this one’s fine)
  • grade-9 algebra
  • about 30 minutes per session
  • programming experienceit’s the math, not the code
  • a GPUyour laptop is plenty
  • calculusderived when needed, in phase 2
Questions students ask
Do I need to know how to code?

No. Margin is about the mathematics behind machine learning. There’s no coding in the club. If you can edit a formula in a spreadsheet, you can start.

How much math, honestly?

Grade-9 algebra gets you through phase 1. Derivatives show up in phase 2 and are built on the page when they do. Nothing is assumed, nothing is skipped.

What happens when I get stuck?

Every Lab walks you through one step at a time, and the club is there in the room when you want a person to ask.

Your turn.

Session 01 takes about thirty minutes and ends with your first real dataset. The line you just fit? You’ll learn the math a machine uses to fit it.

Start Session 01 →free · in the browser · no setup
Margin: machine learning, by hand, from scratch