Week 6 lecture notes