Homework
Note: This website is from Spring 2021. The current (Spring 2022) course is here.
Number | Due Date | Questions | Solutions |
1 | Jan 29 | .pdf | .tex | .pdf | .tex |
2 | Feb 26 | .pdf | .tex | .pdf | .tex |
3 | Mar 12 | .pdf | .tex | .pdf | .tex |
4 | April 30 | .pdf | .tex | .pdf | .tex |
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.
Projects
Number | Due Date | Description | Python | Solution |
1a | Feb 12 | EigenFaces | .ipynb | .ipynb |
1b | Feb 12 | Robust PCA | .ipynb | .ipynb |
1c | Feb 12 | PCA Audio Compression | .ipynb | .ipynb |
2a | Mar 26 | TV image deblurring | .ipynb | .ipynb |
2b | Mar 26 | TV image inpainting | .ipynb | .ipynb |
3 | May 9 | Machine Learning Classification | .ipynb |
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.
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.
- Introduction to Python
- Introduction to Numpy
- Reading/Writing images and audio in Python
- 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
- Overleaf
- Information on LaTeX, MiKTeX, etc.
- Getting MiKTeX.
- The not so short introduction to LaTeX by Tobias Oetiker.
- Wikibook on LaTeX.
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.