Three Bares] [Aerial view of 
campus] [First week of 

Economics 706/420

This page is for the new (2018) course on Machine Learning.

Class Notices:

The class outline is here as a PDF file, and here in HTML.

A brief list of the topics we will treat is as follows.

Method of Evaluation:

Last year, we decided that the most useful way of evaluating our abilities with machine learning would be to get hold of a suitable data set and train an algorithm for some appropriate task. It was also decided that, although individual students are very welcome to carry out a project alone, it is also quite in order for students to work in pairs, and submit one single project for the two participants.

This year, the rules for the project are the same. Students may undertake their projects either alone, or in pairs. Projects should be submitted to me by email by the end of the year, that is, to be precise, December 31, 2020

People who would like to work with a partner, but have not yet found one, should email me to that effect, and I will try to find one. Contrariwise, people who would like to volunteer to serve as another person's partner should also email me.


We will follow the textbook Deep Learning, by Goodfellow, Bengio, and Courville. I do not expect to have time to cover any more than the first two main sections of the book. The book is available online at this site. It is also available as a hardback physical book.

We will also use Hands-on Machine Learning with SciKit-Learn, Keras and TensorFlow, Aurélien Géron, O'Reilly 2017 in parallel with the other textbook. This is a revised and updated version of a book that for the past two years has turned out to be a really valuable resource.

Here are other resources. See the course outline for more information about them.

More resources

This link is to a set of short additional notes for the course. It begins with a discussion of the singular value decomposition, generalised matrix inverses, and principal components analysis.

The resources and links given here are things I found or was told about since setting up the resources above, and are not in the course outline.

Data and Python files

Although it is not hard to download the MNIST data directly from within Python, it may be more convenient to get the data from the MNIST_data directory. The names of the files are mostly self-explanatory, but those names beginning t10k contain the test data.

This Python file contains code for loading the files in the MNIST_data directory, and then performing some of the tasks we spoke about during the second class, taken from Chapter 3 of Géron's "Hands-on" book. In order to run it successfully, you will need to install a number of Python libraries. If you are still using Python2 (not recommended), the tool for installing libraries is pip; if you have moved on to Python3, it is called pip3.

Then, from a terminal, issue the command

pip3 install --upgrade jupyter matplotlib numpy pandas scipy scikit-learn

If you like, you can add tensorflow to the list of modules to install. We will want it later.

It is advisable, although it is not necessary, to do all of the above in a virtual environment, in order not to mess up anything else you may be doing with Python on your computer. First install another package:

pip3 install --user --upgrade virtualenv

Then, create a directory (or folder, as some call it) where you wish to work, and, from within this directory, issue the command

virtualenv -p python3 venv

You can alter venv to any other name you like. Then, from the same place where you created the virtual environment, do

source venv/bin/activate

You are now in your virtual environment, and can proceed to install the various packages mentioned above. Once you are finished, you can just type deactivate, and you have left the virtual environment.

Log of material covered


To send me email, click here or write directly to Russell.Davidson@mcgill.ca.

[apache logo] [a penguin]
go back
Click here for the main page of this site.

URL: https://russell-davidson.arts.mcgill.ca/e706