Exercise 1: Write a jupyter notebook to use the EM algorithm to adapt the means of a 2D Gaussian
mixture model with fixed covariance matrices (which can be the same). The notebook should show the
mathematical derivation for the EM equations. Follow the style and plots of the demonstration in class.
Exercise 2: Extend your EM algorithm to adapt the covariance matrices and the prior probabilities of the
mixtures. You do not have to show (or do) the derivation. Use the book or lecture notes.
Exercise 3: Use a built-in PCA function to compute the principal components (PCs) of the MNIST
dataset. Make a scatter plot of the first two PCs (PC2 vs PC1). Plot the first few PCs as images.
Exercise 4: Use your algorithm for adapting general Gaussian mixture models to learn mixtures for the
MNIST dataset in the reduced data space using the first two PCs (so you can plot). You can learn in more
than two data dimensions if you wish, but you will have to figure out how to best plot the results.
• Mon Apr 2 – Group discussions. Discussion summaries are due by midnight.
• Mon Apr 9 – Group presentations.
• Wed Apr 11 – Final notebooks are due before midnight. Submit all notebooks (or pdfs) to Canvas.
• Mon Apr 16 – Peer evaluations are due before noon.
• You are required to use git to manage your code and notebook and make commits regularly to show
your progress. You must make a submission of your code and notebooks to canvas before each group
discussion, group presentations, and the final due date.
• Use one jupyter notebook (or latex-generated pdf file) per exercise.
• Each notebook should include all necessary text, math, code, and results for clearly explaining your
work to others. In addition to submitting the notebooks (the .ipynb files) you should also submit the
export of the notebook to a pdf file.
• If you are using a language that does not support jupyter, you must create a pdf notebooks using latex.
Use separate pdfs for each notebook.
• After the discussion session, you should submit your feedback to others’ work on canvas in their
The goal of this discussion is for each member of the group to have a clear idea of how to approach all the
exercises in the assignment. You are free to ask any questions and offer any help that helps toward
completing the assignment. A good outcome would be for everyone to have gotten a good start on the
first two exercises.
Each member of the group will have 7-8 min to present their notebooks to the other members of the
group. Group members should take notes on each presentation for peer review of the final submission
(due the following Monday via Canvas). Students are expected to use the feedback from the group to
improve their notebooks before final submission. An group selected moderator will ensure that everyone
stays within the time limits and that feedback is constructive.
Group members are responsible for evaluating each of the other group members on completeness, clarity
and depth understanding, correctness, thoroughness, and creative exploration. As well as a brief
summary. Criteria are scored on a scale of 0-3. Details are in the rubric.