Statistical inference with probabilistic graphical models