Install
The Math Behind the Methods
Linear algebra, calculus, probability, statistics and optimization as machine learning uses them. 26 articles.
Linear algebra in practice
Vectors as Data Points: The Geometry Behind a Feature TableSee how each row of a feature table becomes a point in space, and what distance, direction and flat boundaries mean for your model.Dot Products and Cosine Similarity in Machine LearningLearn what a dot product measures, how cosine similarity differs from it and from distance, and how to pick one for search or scoring.Counting FLOPs: What Matrix Products Cost in a ModelCount the arithmetic in dense, convolution and attention layers, and learn why the FLOP total alone does not tell you the running time.Tensor Shapes and Broadcasting: Reading the Dimensions of a ModelRead array shapes with confidence, apply the broadcasting rules, and catch the silent shape bugs that corrupt a loss without raising errors.L1, L2 and Infinity Norms and Where Each Appears in LearningCompare the three common vector norms and see how each shapes losses, penalties, gradient clipping, distances and robustness budgets.Eigenvectors of a Covariance Matrix and What They Reveal About DataWork a small example to see how covariance eigenvectors show the main directions of spread, redundancy among features and their limits.Singular Value Decomposition for Compression and Latent FactorsUnderstand what SVD does to a matrix, work a two by two case by hand, and use truncation to compress data and find latent factors.Low-Rank Approximation: Why So Many Models Exploit ItLearn why large matrices can often be replaced by two thin ones, what that saves, where models use the trick and when it breaks down.Projections and the Geometry of Least SquaresSee least squares as dropping a perpendicular onto the space your features can reach, with a worked fit and what the geometry explains.Positive Definite Matrices in Kernels and OptimizationLearn what positive definiteness means, how to test for it, and why kernels, covariance matrices, Newton steps and convexity depend on it.Condition Numbers and Why Some Training Problems Are HardSee how a single ratio predicts sensitive solutions and slow gradient descent, with worked numbers and practical ways to improve it.
Calculus for training
Partial Derivatives of a Model Loss, Worked by HandCompute the gradients of linear and logistic regression losses step by step, check them numerically and turn them into training updates.The Chain Rule Applied to Computation GraphsDraw a calculation as a graph, run a forward and backward pass by hand, and build a tiny automatic differentiator in Python.Jacobians and Vector-Jacobian Products in Deep LearningSee what a Jacobian holds, why backpropagation never builds it, and how vector-Jacobian products work for common layers.The Hessian Matrix and the Curvature of a Loss SurfaceLearn what the Hessian says about curvature, step sizes and saddle points, and how to probe it without storing the whole matrix.Matrix Calculus Identities a Machine Learning Reader NeedsA compact, checked set of gradient identities for vectors and matrices, with shape rules, a derivation method and test code.Automatic Differentiation: Forward Mode and Reverse Mode ComparedTrace one function through both modes of automatic differentiation, compare their costs, and learn where each one fits.Taylor Approximations and Why Optimizers Rely on ThemSee how linear and quadratic approximations of a loss lead to gradient descent, step size limits, Newton steps and tree splits.
Probability and information
Random Variables and Distributions That Show Up in Model BuildingA working guide to the distributions behind common losses and priors, how to pick one for your target, and how to check it.The Gaussian Distribution in Machine Learning and Its LimitsWhy the bell curve appears throughout machine learning, how its multivariate form works, and when assuming it will mislead you.Expectation and Variance of an Estimator, With Model ExamplesUnderstand bias, variance and mean squared error of estimators through accuracy scores, shrinkage, ensembles and mini-batches.Deriving Cross-Entropy Loss From LikelihoodBuild binary and multiclass cross-entropy from the probability of the data, compute gradients by hand and avoid numeric traps.Maximum a Posteriori Estimation and Its Link to Weight PenaltiesSee how a prior on the weights turns into an L2 or L1 penalty, how to match the constants, and where the analogy stops.KL Divergence: Measuring How One Distribution Differs From AnotherCompute KL divergence by hand, understand why direction matters, and see how it behaves in training, distillation and monitoring.Mutual Information as a Tool for Feature and Representation AnalysisLearn what mutual information measures, compute it from a table, use it to screen features, and avoid its estimation traps.Conditional Independence and Probabilistic Graphical ModelsUnderstand conditional independence through numbers, read chains, forks and colliders, and see how graphs shrink a model.