Machine Learning
From the maths to transformers — the ML you need for data science, ML engineering and AI roles.
A math-first path through machine learning. Start with the linear algebra, calculus and probability that everything rests on, then classical models, neural networks, transformers and large language models, and finish with how ML systems are designed and run in production. Every topic ends with the interview questions it usually generates.
- Derive gradient descent, linear and logistic regression and backpropagation yourself
- Pick the right model and metric for a problem and explain bias, variance and regularisation
- Explain CNNs, RNNs, attention and transformers, and how LLMs are trained and fine-tuned
- Design an ML system end to end — data, features, training, serving and monitoring
Math foundations
Linear algebra, calculus, probability and optimisation — only what ML actually uses.
What Machine Learning Really Is
Learning a function from data: supervised, unsupervised and reinforcement learning, the training loop, and how this module is organised.
Linear Algebra for ML
Vectors, dot products, matrices, matrix multiplication, transposes, inverses, eigenvectors and why a dataset is just a matrix.
Calculus: Derivatives, Gradients and the Chain Rule
The derivatives you need for ML: what a gradient is, partial derivatives, the chain rule that powers backpropagation, and common derivatives.
Probability and Statistics for ML
Random variables, distributions, expectation and variance, Bayes' theorem, maximum likelihood, and the statistics behind evaluation.
Optimisation: Gradient Descent and Friends
Batch, stochastic and mini-batch gradient descent, learning rates and schedules, momentum, RMSProp and Adam, and convexity.
Classical machine learning
Regression, classification, trees and ensembles, evaluation, unsupervised learning.
Linear Regression
The first model everyone learns: the hypothesis, mean squared error, the normal equation, gradient descent, assumptions and interpreting coefficients.
Logistic Regression and Classification
Predicting probabilities with the sigmoid, the decision boundary, binary cross-entropy, softmax for many classes, and choosing a threshold.
Bias, Variance, Overfitting and Regularisation
Why models underfit or overfit, the bias–variance decomposition, learning curves, cross-validation, and L1/L2, dropout and early stopping.
Evaluation Metrics
Confusion matrix, precision, recall, F1, ROC-AUC vs PR-AUC, metrics for imbalanced data, regression metrics and ranking metrics.
Decision Trees, Random Forests and Gradient Boosting
How trees split with Gini and entropy, why single trees overfit, bagging and random forests, boosting with XGBoost/LightGBM, and feature importance.
Support Vector Machines and k-Nearest Neighbours
Maximum-margin classifiers, soft margins and the hinge loss, the kernel trick, and the instance-based k-NN with its curse of dimensionality.
Unsupervised Learning: Clustering and PCA
k-means and how to choose k, hierarchical clustering and DBSCAN, principal component analysis step by step, and anomaly detection.
Data Preparation and Feature Engineering
Cleaning data, handling missing values and outliers, encoding categories, scaling, building features, class imbalance, and avoiding leakage with pipelines.
Deep learning
Neural networks, backpropagation, training tricks, CNNs and RNNs.
Neural Networks and Backpropagation
Neurons, layers and activations, why non-linearity matters, the forward pass, backpropagation derived for a two-layer network, and the universal approximation idea.
Training Deep Networks Well
Weight initialisation, vanishing and exploding gradients, batch and layer normalisation, dropout, residual connections, and a practical training recipe.
Convolutional Neural Networks
Convolutions, filters, stride and padding, pooling, receptive fields, classic architectures from LeNet to ResNet, and transfer learning for images.
Sequence Models: RNNs, LSTMs and Word Embeddings
Processing sequences with recurrent networks, why plain RNNs forget, LSTM and GRU gates, word embeddings like word2vec, and seq2seq — the road to attention.
Transformers & LLMs
Attention, transformers, pretraining and fine-tuning, embeddings and RAG.
Attention and the Transformer
Scaled dot-product attention from scratch, queries, keys and values, multi-head attention, positional encodings, and the encoder and decoder blocks.
Large Language Models: Pretraining to Chat
Tokenisation, next-token pretraining, scaling laws, supervised fine-tuning, RLHF and preference optimisation, decoding strategies, and parameter-efficient fine-tuning with LoRA.
Embeddings, Vector Search and RAG
Sentence embeddings and similarity, vector databases and approximate nearest-neighbour search, the retrieval-augmented generation pipeline, chunking, hybrid search, reranking and evaluation.
ML system design
Designing, deploying and monitoring ML in production.
ML System Design: The Framework
How to answer 'design an ML system for X': problem framing, data and labels, features, models, offline and online evaluation, serving and monitoring.
Case Study: A Recommendation System
Designing 'recommended for you' for an e-commerce or video app: collaborative filtering, two-tower retrieval, ranking models, cold start, and evaluation.
Case Study: Real-Time Fraud Detection
Scoring payments in milliseconds: extreme class imbalance, delayed labels, velocity features, rules plus models, thresholds tied to cost, and adversarial drift.
MLOps: Deploying and Running Models
Reproducible training pipelines, model registries, batch vs online serving, feature stores, CI/CD for models, monitoring for drift, and responsible AI basics.