CS 445 -- Machine Learning

Using Jupyter Notebooks

This class will utilize Jupyter notebooks for many of our labs. These notebooks utilize a web-based interactive environment where the learning material (text, images, etc) can be combined with Python code and data.

This semester, some notebooks have been enhanced to use nbgrader. This add-on provide many features, but the main one utilized in this setting is the autograder. This is not really used to provide a grade, but rather, to provide a way that you can verify your results while perform the lab (i.e., are my answers correct, did I complete all the problems in the notebook).

Starting Jupyter Notebooks

Follow these steps to utilize jupyter notebooks:
  1. Place all lab files in a directory (recommend a separate directory for each lab
  2. Open a command prompt/terminal and cd into this directory
  3. Make sure your python environment is set (have you sourced the activate script to setup the venv You can check this on Unix/Mac based systems usin (it should be using the python in your venv). by typing
    which python
  4. To start the notebook, enter the folllowing command and press enter.
    jupyter notebook
    .
  5. A web browser should start and present the contents of the where jupyter was started.
  6. Click on the lab file that ends with .ipynb, it should open and present a screen similar to the following image.
  7. You should now be ready to use the notebook. Notice the validate button (cirled in red in the above image). This is the nbgrader package. You should click this button when you have completed a section of the notebook to help check your work. Note that validate may report errors for sections that you have not completed
  8. To turn in your notebook, simply save your .ipynb file and upload it to Canvas. Most labs will be group activities, so, please note your lab partner in the text submission area in Canvas (and use both first and last names).

Jupyter Notebook Tutorials

There are a lot of features packed into Jupyter notebooks. Here are a few additional tutorials that I have glanced through and found helpful.