# Homework

## Spring 2017

• No credit for late homework.
• Programming assignments must be in Python, and must run on your instructional account on cycle1.csug.rochester.edu.
• Use numpy for matrix operations.
• To get an instructional account, see Marty Guenther in CSB 735.
• To turn in programming assignments, run the command /u/cs246/TURN_IN

Homework 1, due in class Mon 1/23
• Bishop 1.3
• Bishop 1.11
• Are the following properties true? Prove or disprove.
1. (X ⊥ W|Z,Y) ∧ (X ⊥ Y|Z) ⇒ (X ⊥ Y,W|Z)
2. (X ⊥ Y|Z) ∧ (X ⊥ Y|W) ⇒ (X ⊥ Y|Z,W)
Homework 2, due Fri 1/27 5pm by turnin script
Implement perceptron for the adult income dataset using Python. Data available in /u/cs246/data/adult. Experiment with performance as a function of learning rate.
Homework 3, due Fri 2/3 5pm by turnin script
Implement SGD for SVM for the adult income dataset. Experiment with performance as a function of learning rate.
Homework 4, due 2/15 in class
Bishop 4.8, 5.4, 5.7, 5.17
Practice Problems: not collected, finish by 2/22
Bishop 6.2, 6.11 (we did this informally in class, check that you can do it formally), 7.2, 7.4
Homework 5, due 3/1 in class
Review problems handed out in class.
Homework 7, due Fri 3/31 5pm by turnin script

Implement EM fitting of a mixture of gaussians on the two-dimensional data set points.dat. You should try different numbers of mixtures, as well as tied vs. separate covariance matrices for each gaussian. OR Implement EM fitting of the aspect model on the discrete data set pairs.dat. You should try different numbers of mixtures.

IN EITHER CASE Use the final 1/10 of the data for dev. Plot likelihood on train and dev vs iteration for different numbers of mixtures.

Homework 8, Fri 4/21 5pm by turnin script
Implement EM to train an HMM for whichever dataset you used for assignment 7. The observation probs should be as in assignment 7: either gaussian, or two discrete distributions conditionally independent given the hidden state. Does the HMM model the data better than the original non-sequence model? What is the best number of states?
Practice Problems: not collected
Bishop 9.8, 9.9, 11.12, 11.13
Homework 9, Mon 5/1 in class
Review problems handed out in class.

gildea @ cs rochester edu
April 18, 2017