[The 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:

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.


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.

Here are other resources. I spoke of one or two of them during the first class. See the course outline for more information about them.

More resources

The resources and links given here are things I found or was told about recently, 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

It has been lots of fun for me to teach this class, and I have certainly learned a lot about machine learning. I hope that the same is true of you.

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

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

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