Reference notes on machine learning, written to be looked up rather than read front to back. The lecture notes for MPL and Foundation Models go deeper on single architectures; these pages are the shorter versions with worked examples.
Foundations
- (y-) Linear and Logistic Regression: least squares, maximum likelihood and the cross-entropy loss.
- (y-) Gradient Descent and Optimizers: SGD, momentum, Adam, AdamW and learning-rate schedules.
- (y-) Backpropagation: computational graphs, reverse-mode autodiff and a two-layer network by hand.
- (y-) Generalization and Regularization: bias and variance, cross-validation, L1 and L2, dropout and early stopping.
- (y-) Evaluation Metrics: precision, recall, ROC and PR curves, calibration and regression metrics.
Classical Methods
- (y-) Decision Trees and Ensembles: splits, random forests and gradient boosting for tabular data.
- (y-) Clustering (k-means, GMM, DBSCAN): grouping without labels and choosing the number of clusters.
- (y-) Dimensionality Reduction (PCA, t-SNE, UMAP): projections, neighbour embeddings and how not to misread them.
Deep Learning
- (y-) The PyTorch Training Loop: datasets, the canonical loop, devices including Apple MPS, and the usual bugs.
- (y-) Convolutional Networks: weight sharing, output sizes, receptive fields and residual connections.
- (y-) Attention and Transformers: scaled dot-product attention, masking, positions and the transformer block.
- (y-) Embeddings: dense vectors, word2vec, contrastive learning and vector search.
- (y-) Graph Neural Networks: message passing, GCN, GraphSAGE, GAT and Sudoku as a graph.
- (y-) Generative Models (VAE, GAN, Diffusion): three ways to learn a data distribution and sample from it.
- (y-) Reinforcement Learning: MDPs, Bellman equations, Q-learning, policy gradients and PPO.
- (y-) Fine-Tuning and LoRA: adapting large models with low-rank updates instead of every weight.