Home / AI Arena / Machine Learning Basics
Machine Learning Basics
A hands-on series that builds the intuition behind how machine learning models actually learn, starting from the idea of prediction and working up through linear regression, loss functions, gradient descent, batches, overfitting, activation functions and neurons, then from predicting a number to choosing between options, all the way to what "predicting the next token" really means. Every part has interactive demos you can run in your browser, and it assumes no background at all.
Based on the AI Power Hour: Weights, Biases and Gradient Descent session. Lost in the vocabulary? There is a glossary of every term the series uses.
-
Part 1
Prediction and Regression
Why prediction is at the heart of intelligence, how Sir Francis Galton accidentally invented machine learning, and what "regression" actually means.
-
Part 2
Weights, Bias, and the Linear Model
What weight and bias actually do to a line, and how changing them lets you fit any straight-line relationship in your data.
-
Part 3
Solve It or Search for It
The two ways to find the best weight and bias, a one-shot formula versus a step-by-step search, and why the search wins once models get big or bendy.
-
Part 4
Loss Functions
How we measure how wrong a model is, Mean Squared Error vs Mean Absolute Error, why their loss curves have different shapes, and what the shape tells gradient descent.
-
Part 5
Gradient Descent
How gradient descent uses the slope of the loss curve to iteratively nudge weight and bias towards their ideal values, the training loop explained.
-
Part 6
The Learning Rate
Why the step size matters, too small and training crawls, too large and it overshoots or blows up. Interactive demos of slow convergence, oscillation and divergence, and how a learning rate is actually chosen.
-
Part 7
Batches, Epochs and the Training Curve
Why real training never looks at the whole dataset at once, what batch size and epochs mean, why "SGD" is the name you will see in code, and how to read the chart every training run produces.
-
Part 8
Overfitting and Generalisation
Why a model can score perfectly on its training data and still fail in the real world, what memorising versus learning looks like, and how held-back data keeps a model honest.
-
Part 9
Local vs Global Minima
Why the loss surface is a bumpy bowl, not a perfect cup, and why ending up at a local minimum is often fine in practice.
-
Part 10
Many Features, One Recipe
What changes when a prediction depends on several inputs at once, one weight per feature, and why gradient descent does not care how many knobs there are.
-
Part 11
Activation Functions
How ReLU, leaky ReLU, sigmoid, and tanh transform a linear neuron's output to model non-linear real-world behaviour, with interactive demos for each.
-
Part 12
Neurons, Chaining, and Specialisation
What happens when you connect activated neurons together, how chaining produces new behaviour, how parallel neurons specialise on sub-problems, and how gradient descent trains a tiny neural network to approximate a sine wave.
-
Part 13
From Numbers to Choices
How a model that predicts a number becomes one that chooses between options, sigmoid as a probability, the decision boundary, softmax across many options, and cross-entropy, the loss that asks how surprised the model was.
-
Part 14
From Straight Lines to ChatGPT
Closing the loop. How the weights, biases, loss functions, and gradient descent you now understand scale up from fitting a line to predicting the next token in a sentence.
-
Reference
Glossary
Every term the series uses, in a sentence or two each, with a link to the part that explains it.