How these pages work
Every concept unit follows the same plan. This page explains what a unit is, what its level means, how it lists the units to read first, and what its code is for.
Each unit teaches one concept
A concept unit is a page that teaches one general idea, such as vectors, gradient descent or KD-trees. The concept sets the page's length. A unit explains its concept as simply as it can be explained, with every step a reader needs, and then stops.
Each unit has the same parts, in this order:
- the units to read first, in a box at the top;
- the idea in one paragraph;
- the body, with a worked example and a figure;
- "Check yourself", with two to four questions and their answers hidden;
- "Go further", a short list of good outside pages on the same concept;
- "Where this shows up", which lists the units that build on this one.
A unit with the tag "overview" covers a larger topic in brief, such as the training loop. It may leave out the worked example and the figure.
Where a unit leaves out a detail on purpose, it says so in a warning box like this one:
A box like this one names the detail that the unit leaves out, and says where that detail matters.
A level states the background a unit assumes in its field
Each unit carries one of three level badges. A level describes the background that a unit assumes in its own field. A field is the subject that a concept belongs to, such as mathematics, programming or machine learning. So one reader can be ready for Advanced units in one field and need Basic units in another.
| Level | The unit assumes | Roughly |
|---|---|---|
| Basic | no background in its field, only everyday math | secondary school, or anyone new to the field |
| Intermediate | the basics of its field | an introductory university course in that field |
| Advanced | more than the basics of its field | upper-level university courses or early graduate work |
A unit also assumes the units it lists to read first. Each of them is at the unit's own level or a lower one.
The items under "Go further" carry the same badges. Each item's badge is set by its own content, so an Intermediate unit can list an Advanced item.
Each unit lists the units it builds on
The box at the top of a unit, "Read these first if they are new to you", lists the units it builds on. Each of those units lists its own, so you can follow the links back as far as you need. Every chain of links ends at a Basic unit that needs nothing else first. On such a unit, the box is titled "Before you start" and says so.
At the bottom of a unit, "Where this shows up" lists the units that build on it. The graph on the index page shows all the units and how they build on each other.
Units show Python code where it helps
Most units show short Python programs. A program can show an idea that a figure or a widget can't. In a unit about coding, such as Recursion: a function that calls itself, the code is part of the lesson.
The code uses plain Python and the libraries NumPy and PyTorch, unless a unit's subject calls for another language. To read it, start with Reading Python and Arrays in NumPy.
To learn more Python, try Python for Everybody, a free course with lessons, a book and videos. If you already program in another language, the official Python Tutorial and A Whirlwind Tour of Python, which also comes as notebooks, are written for you.