Machine learning, step by step
The ideas behind machine learning and deep learning, drawn so you can watch them work.
The basics
Regression
Linear regression
Gradient descent walking down the error, step by step, and what a too large step does.
Open →Bias, variance & regularisation
Too simple or too wiggly, and how Ridge and Lasso hold the weights back.
Open →Decision trees & random forest
Splits drawn on the plane and as a tree, and a forest of trees that vote.
Open →Voting & boosting
Different models that vote, and small trees in turn that each learn what the last ones missed.
Open →Classification
Logistic regression & evaluation
Move the threshold and watch the confusion matrix, precision, recall and the ROC curve.
Open →Support vector machines
The widest street between two classes, and the points that hold it up.
Open →More than two classes
One model per class, one per pair, or one with softmax: three ways to split a plane into many classes.
Open →Without labels
Deep learning
Neural networks
A small network learning a shape it cannot draw with a straight line, with backpropagation.
Open →Convolutional networks
Filters sliding over a digit you draw, pooling and padding.
Open →Recurrent networks
A memory that is carried from one character to the next.
Open →Semantic search & RAG
Text in chunks, as vectors, and a question that finds the nearest ones.
Open →Attention
Every word asks every other word what matters: the idea behind transformers, in two small layers.
Open →In practice
Learning by trying
Want to read more?
These pages follow the topics of a good Swedish textbook, with their own examples and pictures. The book goes further, with code in scikit-learn and Keras: Lär dig AI från grunden – Tillämpad maskininlärning med Python (Prgomet, Johnson, Solberg, Rundberg Streuli).