Math for ML, by Hand
Linear algebra, calculus and probability for machine learning, worked on one model small enough to check with a pencil.
Two users, one 2×2 matrix and a sigmoid. The user who clicked is x = (3, 4); the one who did not is x′ = (1, 2). Both start at p = 0.5, and each part of the series explains one more box of the model until every number in it has been computed by hand.
Part 1: Why Is a Data Point an Arrow?
Math for ML, by Hand (part 1 of 4): vectors, length and angle, worked on one tiny model you can check with a pencil.
Part 2: What Does a Weight Matrix Actually Do to Your Data?
Math for ML, by Hand (part 2 of 4): linear maps, matrix products, determinants, eigenvectors and the SVD, on one 2×2 matrix.
Part 3: Why Does Gradient Descent Bounce?
Math for ML, by Hand (part 3 of 4): derivatives, integrals, gradients, the chain rule and the Hessian, on a model you can train with a pencil.
Part 4: Why Is Your Loss Function an Expected Value?
Math for ML, by Hand (part 4 of 4): probability, conditioning, expected value, the law of large numbers, entropy, cross-entropy and KL divergence.
The running cast
| name | value |
|---|---|
| x (clicked) | (3, 4) |
| x′ (did not) | (1, 2) |
| A | [[2, 1], [1, 2]] |
| w, b | (1, −1), 1 |
| start | z = 0, p = 0.5, loss 0.693 each |