graphical models assignment2