1 Preliminaries
Consider the smallest complete learning problem: load a table of examples, represent it as tensors, compute a prediction and a loss, differentiate that loss, and decide whether the result is plausible. Each step fails without a specific tool. Arrays store and transform the data; linear algebra expresses the prediction; calculus and automatic differentiation supply its gradients; probability distinguishes a stable pattern from sampling noise; and framework documentation resolves the implementation details.
This chapter develops those prerequisites in that order, beginning with tensor and tabular-data operations and ending with a practical method for consulting framework documentation.
The treatment is intentionally concise. Each section introduces the notation and operations needed by later chapters; the mathematics appendices develop the same subjects in greater depth.
Resources and Further Reading
The references below provide fuller treatments of array programming, data preprocessing, linear algebra, calculus, probability, and framework documentation. All are freely accessible online except where noted.
Books
- This book’s Mathematics for Deep Learning part develops the linear algebra, calculus, and probability introduced here in greater depth.
- Python for Data Analysis, 3rd ed. — Wes McKinney — a free open-access guide to NumPy and pandas data manipulation by the creator of pandas.
- Python Data Science Handbook — Jake VanderPlas — free online; a broad, example-driven tour of NumPy, pandas, and the wider scientific-Python stack used throughout the book.
- Mathematics for Machine Learning — Deisenroth, Faisal & Ong — free PDF; a complementary, ML-aligned development of the linear algebra, calculus, and probability this chapter only previews.
- Introduction to Probability — Blitzstein & Hwang — a free PDF with accompanying lecture videos from Harvard’s Stat 110.
Courses and video lectures
- Essence of Linear Algebra — 3Blue1Brown — a free animated series on geometric interpretations of vectors and matrices.
- Essence of Calculus — 3Blue1Brown — free animated video series; builds the visual intuition for derivatives, chain rule, and limits behind the calculus and autograd sections.
- NumPy: the absolute basics for beginners — NumPy project — the official getting-started tutorial for the array operations introduced in the ndarray section.
- NumPy Tutorials — NumPy project — official community tutorials as runnable Jupyter notebooks, applying array programming to concrete data tasks.
Tutorials, notes, and documentation
- Array programming with NumPy — Harris, Millman, van der Walt et al. (Nature, 2020) — the reference paper on the n-dimensional array model underpinning every tensor library in this book (open-access; preprint at arXiv:2006.10256).
- NumPy user guide — NumPy project — the official reference for array creation, indexing, broadcasting, and data types.
- pandas user guide — pandas project — the official, topic-organized reference for the loading, indexing, and missing-data handling covered in the pandas section.
- PyTorch documentation — PyTorch project — the official API docs; the canonical place to look up tensor operations and
autograd, directly reinforcing the lookup-api section’s message. The corresponding documentation hubs for JAX, TensorFlow, and MXNet are collected in Section 1.7. - SciPy documentation — SciPy project — official docs for linear algebra, optimization, and statistics routines that complement the linear-algebra, calculus, and probability sections.