Computer Science 446

Homework

Spring 2021

  • 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.
  • Connect to instructional machines via ssh to write and to turn in your code.
  • If you do not already have a CS instructional account, visit https://accounts.csug.rochester.edu
  • To turn in programming assignments, run the command /u/cs446/TURN_IN

Homework 1, due Fri 2/5 5pm
  • Bishop 1.3
  • Bishop 1.11
  • Let (X ⫫ Y) denote that X and Y are independent, and let (X ⫫ Y|Z) denote that X and Y are independent conditioned on Z (Bishop p. 373). 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 Wed 2/10 5pm by turnin script
Implement perceptron for the adult income dataset using Python. Data available in /u/cs446/data/adult. Experiment with performance as a function of number of iterations. See detailed interface instructions and put your code in this skeleton Python file. To run a simple test of basic functionality, download and run this smoke test file in the same directory as your Python file (uses Python 3).
Homework 3, due Fri 2/26 5pm by turnin script
Implement backprop for the adult income dataset. Download the files in this archive and extract them using tar xzvf backprop_files.tar.gz. See detailed instructions.
Homework 4, due Tu 3/4 11am
Bishop 4.8, 5.4, 5.7, 5.17
Practice Problems: not collected, finish by 3/12
Bishop 6.2, 6.11, 7.2, 7.4
Homework 5, due Tu 3/16 BEFORE class
Review problems handed out in class.
Homework 7, due Fri 4/16 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. Use this skeleton file (different than the skeleton below).

OR

Implement EM fitting of the aspect model on the discrete data set pairs.dat. You should try different numbers of mixtures. Use this skeleton file (different than the skeleton above).

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. Follow these detailed instructions. Use the contents of this archive to test your code prior to submitting.

Homework 8, Fri 4/23 5pm by turnin script
Implement EM to train an HMM for whichever dataset you used for assignment 7. Use the first 900 observations as a single training sequence, and the last 100 as a single development sequence. 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?

The Gaussian skeleton is here. The aspect skeleton is here. The smoke test files are in this archive.

Practice Problems: not collected, finish by 4/30
Bishop 9.8, 9.9, 11.12, 11.13
Homework 9, Th 5/6 BEFORE class
Review problems handed out in class.

gildea @ cs rochester edu
April 30, 2021