1 Preliminaries
To prepare for your dive into deep learning, you will need a few survival skills: (i) techniques for storing and manipulating data; (ii) libraries for ingesting and preprocessing data from a variety of sources; (iii) knowledge of the basic linear algebraic operations that we apply to high-dimensional data elements; (iv) just enough calculus to determine which direction to adjust each parameter in order to decrease the loss function; (v) the ability to automatically compute derivatives so that you can forget much of the calculus you just learned; (vi) some basic fluency in probability, our primary language for reasoning under uncertainty; and (vii) some aptitude for finding answers in the official documentation when you get stuck.
In short, this chapter provides a rapid introduction to the basics that you will need to follow most of the technical content in this book.
Resources and Further Reading
The references below round out the survival skills sketched in this chapter: array programming, data wrangling, the linear algebra / calculus / probability we only touch lightly, and the habit of finding answers in official 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 sketched here in full; start there when you want proper depth on the math the rest of this chapter only previews.
- Python for Data Analysis, 3rd ed. — Wes McKinney — free open-access edition by the creator of pandas; the definitive practical guide to NumPy and pandas data manipulation, matching this chapter’s ndarray and pandas sections.
- 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 — free PDF and accompanying lecture videos (Harvard’s Stat 110); the natural next step after this chapter’s probability section, with the same intuition-first spirit.
Courses and video lectures
- Essence of Linear Algebra — 3Blue1Brown — free animated video series; the geometric intuition (vectors as arrows, matrices as transformations) that perfectly complements this chapter’s code-first linear-algebra section.
- 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; the fastest hands-on path to 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 documentation hub; your first stop for looking up array creation, indexing, broadcasting, and dtypes, as urged in the lookup-api section.
- 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.