Unit 0: Your toolkit
Get fast with the tools you will use every day. This unit is short: do it alongside the start of Unit 1.
The big picture
Tools are like a carpenter's workshop. You cannot learn furniture design while fighting with the saw. NumPy is your saw: practise until it feels natural.
Lessons in this unit
- Meet machine learning: the big picture: Machine learning is getting a computer to learn a pattern from examples, instead of a person writing the rules by hand.
- Python basics: variables, lists, loops and functions: Python is the programming language of machine learning. You store values in variables, keep many values in a list, repeat work with a loop, and package steps into a function you can reuse.
- NumPy arrays, shapes and indexing: A NumPy array is a grid of numbers, all of the same type, with a shape that says how long it is in each direction.
- Broadcasting and vectorisation: Vectorisation means doing maths on whole arrays in one operation; broadcasting is NumPy's rule for combining arrays of different shapes by stretching any direction of size 1.
- Plotting results with Matplotlib: Matplotlib is the standard Python library for drawing charts; in ML you use it mostly to see loss curves, data and predictions.
- Git and GitHub for your projects: Git saves snapshots of your project, called commits, so you can go back, branch off and merge; GitHub stores those repositories online.
- Testing numerical code (np.allclose, pytest): A test is a small program that runs your code on a case where you already know the answer, and fails loudly when the result is wrong. Decimals are compared with a small tolerance.