Fundamentals of Machine Learning · All lessons

From a prediction to a better model

Learn how a small model calculates a prediction, measures error, and updates its weights. See how the same learning process applies to different prediction tasks. Each lesson includes a worked example, browser controls, and AI feedback on your explanation.

Lesson 1

One neuron

Follow two ticket features through weights, a score, and a probability. See why changing a routing threshold does not change the model.

Open lesson →
Lesson 2

Loss functions

Measure how much probability reaches the right answer, then apply the same calculation to demonstrated response tokens in SFT.

Open lesson →
Lesson 3

Gradients and backpropagation

Find which direction a weight should move, and check the derivative by making a small change yourself.

Open lesson →
Lesson 4

Optimizers and training loops

Compare learning rates, repeat parameter updates, and find out why a training checkpoint needs more than weights.

Open lesson →
Lesson 5

Batches and shapes

Work out how one set of weights processes many requests, what shape comes out, and why batching can improve throughput.

Open lesson →
Lesson 6

Softmax and class probabilities

Convert competing class scores into probabilities without numerical overflow. Understand why the correct class is a training target, not a random draw.

Open lesson →

Ready to apply this to language?

N-grams, embeddings, and transformers are now in Building Language Models from Scratch. This ML track ends with softmax; the language-model track is an optional next step.

Want to work through the code?

The shared NumPy examples run locally and show the calculations without a training framework. The slides and PowerPoint are optional references.