A library for creating and using probabilistic graphical models