Appendix E Lab Index
The notebooks are linked supplements to the textbook. They are not meant to be long take-home programming assignments. The core path in each lab is designed for in-class use or guided review.
Lab U1: Vectors, Similarity, Attention, and Matrix Actions. Unit 1. Status: core, with optional warm-up and optional extension sections. Core idea: read short NumPy snippets as mathematical notation; interpret norms, dot products, cosine similarity, attention-style weighted averages, matrix-vector products, matrix products, geometric matrix actions, and affine maps. Tags:
[U1-LO1, U1-LO2, U1-LO3, U1-LO4, U1-LO5, U1-LO6, U1-LO7, U1-LO8 | C+R+T | Core].
Lab U2: Understanding a Linear Map. Unit 2. Status: core. Core idea: read short NumPy and SymPy snippets as mathematical notation; interpret reachable outputs, row reduction, plane intersections, homogeneous systems, forgotten directions, rank, null vectors, redundant features, determinants, and inverse checks. Tags:
[U2-LO1, U2-LO2, U2-LO3, U2-LO5, U2-LO6, U2-LO7 | C+R+T | Core].
Lab U3: Jacobian matrices and local linearization. Unit 3. Status: core. Core idea: Jacobian matrices and local linear prediction. Tags:
[U3-LO3, U3-LO5 | C+R+T | Core].
Lab U4: Regression as Projection. Unit 4. Status: core. Core idea: design matrices, least squares, residual orthogonality. Tags:
[U4-LO4, U4-LO5, U4-LO7 | C+M+T | Core].
Lab U5: Gradient descent and tiny training. Unit 5. Status: core. Core idea: read short NumPy snippets as mathematical notation; interpret gradient descent updates, learning-rate comparisons, debugging the descent sign, two-dimensional quadratic losses, Hessian eigenvalues, least squares as a zero-gradient problem, residual orthogonality, fixed-hidden-layer design matrices, and rank-one outer-product updates. Tags:
[U5-LO2, U5-LO3, U5-LO4, U5-LO5, U5-LO6, U5-LO7 | C+M+T | Core].
Lab U6: SVD and Compression. Unit 6. Status: core. Core idea: read short NumPy snippets as mathematical notation; interpret SVD shapes, singular values, singular-vector identities, rank and null directions, redundant features, energy retained, rank-\(k\) reconstruction, compression on a small matrix, low-rank update shapes, and review code-reading checks. Tags:
[U6-LO4, U6-LO5, U6-LO6, U6-LO7 | C+M+T | Core].
Lab U7: Polynomial Approximation. Unit 7. Status: core. Core idea: read polynomial feature matrices, least-squares coefficients, fitted values, residual checks, shrinking-interval coefficients, Gram-Schmidt checks, sampled plane fits, and Hessian quadratic forms. Compare Taylor, continuous least-squares, and sampled least-squares approximations. Tags:
[U7-LO3, U7-LO4, U7-LO5, U7-LO6, U7-LO7 | C+M+T | Core].
Transformer Wrap-Up Lab: A Tiny Attention Block. Appendix: Transformer Wrap-Up Worksheet. Status: optional extension. Core idea: token matrices, attention scores, masks, weighted values, logits, and one small loss. Tags:
[U1-LO3, U1-LO6, U1-LO8, U3-LO7, U5-LO2 | C+R+T | Optional].
