added function to get Unary Potentials

As described in
http://www-users.cs.umn.edu/~banerjee/papers/12/drought.pdf