# CSC411: Machine Learning and Data Mining (Winter 2017)

 This course serves as a broad introduction to machine learning and data mining. We will cover the fundamentals of supervised and unsupervised learning. We will focus on neural networks, policy gradient methods in reinforcement learning. We use the Python NumPy/SciPy stack. Students should be comfortable with calculus, probability, and linear algebra. Required math background Here's (roughly) the math that you need for this course. Linear Algebra: vectors: the dot product, vector norm, vector addition; matrices: matrix multiplication. Calculus: derivatives, derivatives as the slope of the function; integrals. Probability: random variables, expectation, independence. Other topics will be needed, but are not part of the pre-requisites, so I will devote an appropriate amount of lecture time to them. Nikulin & Novak, Exploring the Neural Algorithm of Artistic Style
 Evaluation The better of: 40%: Projects 30%: Midterm 30%: Final Exam Or: 40%: Projects 15%: Midterm 45%: Final Exam You must receive at least 40% on the final exam to pass the course.

Teaching team

Instructor: Michael Guerzhoy. Office: BA5244, Email: guerzhoy at cs.toronto.edu (please include CSC411 in the subject, and please ask questions on Piazza if they are relevant to everyone.)

CSC411 TAs: Patricia Thaine, Aditya Bharagava, Yulia Rubanova, Yingzhou Wu, Shun Liao, Bin Yang, Jixuan Wang, Aleksei Shkurin, Alexey Strokach, Katherine Ge, Karo Castro-Wunsch, Farzaneh Mahdisoltani.

Projects

A sample report/LaTeX template containing advice on how to write project reports AI courses is here (see the pdf and tex files). (The example is based on Programming Computer Vision, pp27-30.) Key points: your code should generate all the figures used in the report; describe and analyze the inputs and the outputs; add your interpretation where feasible.

Project 1: Face Recognition and Gender Classification Using Regression (10%) Due Jan. 29 Feb 1 at 11PM
Project 2: Deep Neural Networks (10% + up to 2% bonus) Due Feb. 19 March 5 at 11PM
Project 3: Supervised and Unsupervised Methods for Natural Language Processing (10% + up to 1.5% bonus) Due Mar. 19 March 21 at 11PM
Project 4: Reinforcement Learning using Policy Gradients (10%) Due Apr. 2 Apr. 4 at 11PM (Note: late projects only accepted by Wednesday Apr. 5 23:59PM)
Lateness penalty: 5% of the possible marks per day, rounded up. Projects are only accepted up to 72 hours (3 days) after the deadline.

Exam

Midterm

The Winter 2017 midterm paper. Solutions and marking scheme. Solutions for Q2b and Q6: intro, performance vs. k, breaking the assumptions behind k-NN.

Friday March 3, 6pm-8pm. Make-up midterm for those who have a documented (a screenshot and/or explanatory email is sufficient) conflict with the main timeslot: TBA. Please send me email if there is an issue.

Coverage: the lectures and the projects, focusing on the lectures.

Getting help

Michael's office hours: Tuesday 6-7PM, Wednesday 5-6PM in BA5244. Or email for an appointment. Or drop by to see if I'm in. Feel free to chat with me after lecture.

Study Guide

The CSC411 study guide (continuously updated)

Software

We will be using the Python 2 NumPy/SciPy stack in this course. It is installed in the Teaching Labs.

For the first two projects, the most convenient Python distribution to use is Anaconda. If you are using an IDE and download Anaconda, be sure to have your IDE use the Anaconda Python.

I recommend the Pyzo IDE available here. To run Pyzo in the Teaching Labs, simply type iep in the command line.

We will be using Google's TensorFlow later on in the course.

We will be using the CS Teaching Labs and AWS for GPU computing. Please sign up using AWS Educate. Use your CS Teaching Labs account when signing up for AWS Educate. You can use either the GPU-equipped machines in the Teaching Labs (30 machines in BA2210 and 6 machines in BA3200) or AWS.

Resources

Pattern Recognition and Machine Learning by Christopher M. Bishop is a very detailed and thorough book on the foundations of machine learning. A good textbook to buy to have as a reference.
The Elements of Statistical Learning by Trevor Hastie, Robert Tibshirani, and Jerome Friedman is also an excellent reference book, available on the web for free at the link.
An Introduction to Statistical Learning with Applications in R by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani is a more accessible version of The Elements of Statistical Learning.
Deep Learning by Yoshua Bengio, Ian Goodfellow, and Aaron Courville is an advanced textbook with good coverage of deep learning and a brief introduction to machine learning.
Learning Deep Architectures for AI by Yoshua Bengio is in some ways better than the Deep Learning book, in my opinion.
Reinforcement Learning: An Introduction by R. Sutton and A. Barto will be useful when we discuss Reinforcement Learning
Geoffrey Hinton's Coursera course contains great explanations for the intution behind neural networks.
The CS229 Lecture Notes by Andrew Ng are a concise introduction to machine learning.
Andrew Ng's Coursera course contains excellent explanations of basic topics (note: registration is free).
Pedro Domingos's CSE446 at UW (slides available here) is a somewhat more theorically-flavoured machine learning course. Highly recommended.
CS231n: Convolutional Neural Networks for Visual Recognition at Stanford (archived 2015 version) is an amazing advanced course, taught by Fei-Fei Li and Andrej Karpathy (a UofT alum). The course website contains a wealth of materials.
CS224d: Deep Learning for Natural Language Processing at Stanford, taught by Richard Socher. CS231, but for NLP rather than vision. More details on RNNs are given here.

Python Scientific Lecture Notes by Valentin Haenel, Emmanuelle Gouillart, and Gaël Varoquaux (eds) contains material on NumPy and working with image data in SciPy. (Free on the web.)

Announcements

All announcement will be on Piazza.

Lecture notes

MarkUs

All project submission will be done electronically, using the MarkUs system. Log in to MarkUs.

For group projects, to submit as a group, one of you needs to "invite" the other to be partners, and then the other student needs to accept the invitation. To invite a partner, navigate to the appropriate Assignment page, find "Group Information", and click on "Invite". You will be prompted for the other student's CDF user name; enter it. To accept an invitation, find "Group Information" on the Assignment page, find the invitation listed there, and click on "Join". Only one student must invite the other: if both students send an invitation, then neither of you will be able to accept the other's invitation. So make sure to agree beforehand on who will send the invitation! Also, remember that, when working in a group, only one person must submit solutions.

To submit your work, again navigate to the appropriate Exercise or Assignment page, then click on the "Submissions" tab near the top. Click "Add a New File" and either type a file name or use the "Browse" button to choose one. Then click "Submit". You can submit a new version of any file at any time (though the lateness penalty applies if you submit after the deadline) — look in the "Replace" column. For the purposes of determining the lateness penalty, the submission time is considered to be the time of your latest submission.

Once you have submitted, click on the file's name to check that you have submitted the correct version.

LaTeX

Web-based LaTeX interfaces: Overleaf, ShareLaTeX

TeXworks, a cross-platform LaTeX front-end. To use it, install MikTeX on Windows and MacTeX on Mac

Detexify2 - LaTeX symbol classifier