Inference and Learning with Graphical Models