01 - Linear Algebra for ML: Vectors, Matrices, and Transformations
A neural network layer is a matrix multiplication. Dot product, matrices, eigenvalues and SVD, each worked by hand and checked with NumPy.
Mathematical foundations for AI: linear algebra, calculus, probability, Bayesian statistics, optimization, and information theory applied to machine learning.
This series collects 10 articles (approximately 162 minutes of total reading time), designed for a level Intermediate. The main topics covered are mathematics, statistics, linear algebra, probability.
A neural network layer is a matrix multiplication. Dot product, matrices, eigenvalues and SVD, each worked by hand and checked with NumPy.
How a network learns: chain rule, activation derivatives, backpropagation by hand and a finite-difference gradient check on an XOR network.
Bayes' theorem, key distributions, Naive Bayes, MLE and MAP, the central limit theorem and hypothesis testing, each with a hand calculation and a check.
Why the step size decides convergence: gradient descent, SGD noise, momentum, Adam and learning-rate schedules, tested on a function you can solve by hand.
Entropy, cross-entropy, KL divergence, mutual information and perplexity as one idea: the bits of surprise a model pays, with hand calculations and checks.
PCA derived as a constrained maximisation, worked by hand on four points and measured on real data: when it compresses well and when it does not help.
MSE, MAE, Huber, cross-entropy, focal loss and temperature, with hand calculations and the gradient of a custom loss checked numerically.
Confidence intervals, hypothesis tests, power and the sample size of an A/B test, with hand calculations, simulations and the traps of repeated looks.
Scaled self-attention derived term by term and checked on three tokens: the sqrt(d_k) factor, multi-head, positional encoding and layer normalisation.
Rotation, mixup, CutMix, SMOTE, text and time series and generative models, with experiments on what goes wrong: changed labels and test-set leakage.
Have you read all the articles? Check how much you've learned by taking this series' quizzes.