Today we look at how to create a neural network from scratch using Python and PyTorch, and how to implement a training loop for optimising the weights of a model. We build up from a single layer regression model up to a neural net with one hidden layer, and then to a deep learning model. Along the way we’ll also look at how we can use a special function called sigmoid to make binary classification models easier to train, and we’ll also learn about metrics.
Video
This lesson is based partly on chapter 4 and chapter 9 of the book.
Lesson notebooks
- Linear model and neural net from scratch
- Why you should use a framework
- How random forests really work
Links from the lesson
- OneR paper
- Some great Titanic notebooks: 1; 2; 3; 4