Practice Labs: Math for ML (MML Book)
Source PDF: Mathematics for Machine Learning Book: Mathematics for Machine Learning by Marc Peter Deisenroth, A. Aldo Faisal, Cheng Soon Ong (Cambridge University Press, 2020)
This book covers the mathematical foundations that underpin machine learning: linear algebra, calculus, probability, optimization, and four central ML algorithms (regression, PCA, GMM, SVM).
Labs
| Lab | Topic | Book Chapter | Key Concepts |
|---|---|---|---|
| Lab 01 | Linear Algebra | Ch 2 | Systems of equations, Gaussian elimination, vector spaces, basis, rank, linear mappings |
| Lab 02 | Analytic Geometry | Ch 3 | Norms, inner products, Gram-Schmidt, orthogonal projections, rotations |
| Lab 03 | Matrix Decompositions | Ch 4 | Eigenvalues, Cholesky, SVD, low-rank approximation |
| Lab 04 | Vector Calculus | Ch 5 | Gradients, Jacobians, backpropagation, Hessians, Taylor series |
| Lab 05 | Probability & Distributions | Ch 6 | Bayes’ theorem, Gaussian, exponential family, conjugacy |
| Lab 06 | Continuous Optimization | Ch 7 | Gradient descent, momentum, Lagrange multipliers, Newton’s method, convexity |
| Lab 07 | Linear Regression | Ch 8-9 | MLE, Bayesian regression, overfitting, cross-validation |
| Lab 08 | PCA | Ch 10 | Maximum variance, projection, scree plot, high-dimensional PCA |
| Lab 09 | Gaussian Mixture Models | Ch 11 | GMM, EM algorithm, K-Means, model selection |
| Lab 10 | Support Vector Machines | Ch 12 | Margin maximization, hinge loss, kernels, soft margin |
How to Use
- Each lab is a Jupyter notebook with theory (markdown) and fully implemented code cells
- Read the theory cells, study the implementations, and run each cell
- Open in Jupyter:
jupyter notebook lab_01_linear_algebra.ipynb
Prerequisites
- Python 3.8+
- NumPy
- Matplotlib
Suggested Order
The book has two parts. Follow Part I (math foundations) first, then Part II (ML applications):
Part I: Mathematical Foundations
- Lab 01 - Linear Algebra (the language of ML)
- Lab 02 - Analytic Geometry (geometry of data)
- Lab 03 - Matrix Decompositions (factoring matrices)
- Lab 04 - Vector Calculus (training and optimization)
- Lab 05 - Probability & Distributions (uncertainty)
- Lab 06 - Optimization (finding best parameters)
Part II: Central ML Problems 7. Lab 07 - Linear Regression (prediction) 8. Lab 08 - PCA (dimensionality reduction) 9. Lab 09 - Gaussian Mixtures (density estimation) 10. Lab 10 - SVM (classification)
What Comes Next
- Return to ../README.md if you want the broader MML book track again.
- Continue into ../../06-neural-networks/README.md or ../../28-practical-data-science/README.md once the mathematical tools here start to feel usable rather than abstract.
Last updated on