Due Friday, December 9 at 11:59 PM via Canvas. PDF format required. In this assignment, you will complete the implementation of a multi-layer Markov Net trained using Gibbs Sampling, and perform a handful of experiments with your code.
You'll want to start by reviewing the notes on the model clarifying the discussion of the model from class.
Then download the code for the assignment. Compile the code with: Then you can run the code with: Note, these classpath statements are specified in the Windows command-line syntax, if you're using a unix variant you'll need slightly different syntax.
The code will give you an error message saying sampleZ isn't implemented; that's the piece you need to complete for the assignment.
Then answer the following questions:
javac -classpath "trove-3.0.3.jar;junit.jar" *.java
java -classpath "trove-3.0.3.jar;junit.jar;." LayeredFlatSequenceModel testSampleZ
java -classpath "trove-3.0.3.jar;junit.jar;." LayeredFlatSequenceModel train penn_train.dat ptb.model ptb.config
Then test it using:
java -classpath "trove-3.0.3.jar;junit.jar;." LayeredFlatSequenceModel test ptb.model penn_test.dat test.config 3761 30
Compare those results to what you get for:
java -classpath "trove-3.0.3.jar;junit.jar;." LayeredFlatSequenceModel test test_model.dat penn_test.dat test.config 3761 30
test_model.dat is a four-layer model with the same number of states (13) at the bottommost layer. These tests might take a few minutes. Report the final test perplexity of each model. What is frustrating about the results?