Homework


The final exam is now available here: pdf | .tex.
Number Questions Submission Link Solutions
1 .pdf | .tex submit .pdf
2 .pdf | .tex submit .pdf
3 .pdf | .tex submit .pdf
4 .pdf | .tex submit

LaTeX code for all homework assignments is provided, and can be used as a template for solutions, if you choose to write them in LaTeX. The homework assignments use a preamble style file you can download here. Place preamble.sty in the same folder as your LaTeX source. Please submit your homework by the due date using the link above.

Projects


Number Description Python Submission Link Solution
1a EigenFaces .ipynb submit .ipynb
1b Robust PCA .ipynb submit .ipynb
1c PCA Audio Compression .ipynb submit .ipynb
2a TV image deblurring .ipynb submit .ipynb
2b TV image inpainting .ipynb submit .ipynb
3 Machine Learning Classification .ipynb submit

For each project, there are several options (e.g., project 1a, 1b, 1c). Choose one to complete. The projects vary in difficulty, and 1a is the most straightforward project. Please submit your code as a Google Colab Notebook, Jupyter notebook .ipynb, or a Python script .py. The class notes have detailed instructions for each project. Please submit your python notebook for each project at the link above.

Python

One of the simplest ways to write and run Python code is to use Google Colab, which only requires a web browser and internet connection. The code is run on Google's cloud servers, and there is no need to install or manage any Python packages (which can be a pain). Google Colab supports Python code in a framework similar to Jupyter Notebooks, where one can write code cells and text cells together in one document. All code provided for lectures, homework, and projects will be Google Colab notebooks.

Below are links to some Google Colab Python notebooks with basic introductions to Python.

  1. Introduction to Python
  2. Introduction to Numpy
  3. Reading/Writing images and audio in Python
  4. Introduction to Pandas (optional)

If you want to run Python locally on your laptop or desktop computer, you can follow this Python Installation Guide to install Python on MacOS, Linux, or Windows. The guide will setup Python and the package manager pip, which is used to install python packages. Alternatively, many people use Conda to install and manage Python packages. Either is fine (I personally use pip), but you should not use both Conda and Pip, or you will end up with package conflicts. Important: You must install Python3 (there is no backwards compatibility with Python2).

To access a command line Python shell that looks similar to Matlab, install IPython. I mainly use IPython and standard .py Python scripts, but many people prefer to write Python code in a Jupyter Notebook, which is an interface to IPython that allows one to write code cells and text cells together in a single document. All Google Colab notebooks provided in this course are similar to Jupyter Notebooks.

LaTeX

A great way to write mathematics electronically is to use LaTeX. LaTeX is widely used for the publication of scientific documents in many fields, including mathematics, physics, computer science and engineering. Some good resources for getting started with LaTeX are

In particular, for first time LaTeX users, Overleaf is a very good way to get started. The homework assignments, solutions, midterms, and finals for this course are all written in LaTeX, and I will post the LaTeX files for all homework assignments throughout the term.

For preparing LaTeX documents, I use the command line editor vim, along with vim-LaTeX, and a PDF-viewer that automatically updates when the pdf file changes (e.g., Skim on Mac, or Evince in Linux). I have used this setup on both Mac OSX and Linux operating systems. Beware that while vim is a powerful text editor, it has a very steep learning curve.