Probabilistic graphical models (PGMs) are a rich framework for encoding probability distributions over complex domains: joint (multivariate) distributions over large numbers of random variables that interact with each other. These representations sit at the intersection of statistics and computer science, relying on concepts from probability theory, graph algorithms, machine learning, and more. They are the basis for the state-of-the-art methods in a wide variety of applications, such as medical diagnosis, image understanding, speech recognition, natural language processing, and many, many more. They are also a foundational tool in formulating many machine learning problems.

This course is part of the Probabilistic Graphical Models Specialization

# Probabilistic Graphical Models 2: Inference

Offered By

## About this Course

### Learner Career Outcomes

## 50%

## 20%

## 20%

### Skills you will gain

### Learner Career Outcomes

## 50%

## 20%

## 20%

#### 100% online

#### Course 2 of 3 in the

#### Flexible deadlines

#### Advanced Level

#### Approx. 24 hours to complete

#### English

## Syllabus - What you will learn from this course

**25 minutes to complete**

## Inference Overview

This module provides a high-level overview of the main types of inference tasks typically encountered in graphical models: conditional probability queries, and finding the most likely assignment (MAP inference).

**25 minutes to complete**

**1 hour to complete**

## Variable Elimination

This module presents the simplest algorithm for exact inference in graphical models: variable elimination. We describe the algorithm, and analyze its complexity in terms of properties of the graph structure.

**1 hour to complete**

**4 videos**

**1 practice exercise**

**18 hours to complete**

## Belief Propagation Algorithms

This module describes an alternative view of exact inference in graphical models: that of message passing between clusters each of which encodes a factor over a subset of variables. This framework provides a basis for a variety of exact and approximate inference algorithms. We focus here on the basic framework and on its instantiation in the exact case of clique tree propagation. An optional lesson describes the loopy belief propagation (LBP) algorithm and its properties.

**18 hours to complete**

**9 videos**

**2 practice exercises**

**1 hour to complete**

## MAP Algorithms

This module describes algorithms for finding the most likely assignment for a distribution encoded as a PGM (a task known as MAP inference). We describe message passing algorithms, which are very similar to the algorithms for computing conditional probabilities, except that we need to also consider how to decode the results to construct a single assignment. In an optional module, we describe a few other algorithms that are able to use very different techniques by exploiting the combinatorial optimization nature of the MAP task.

**1 hour to complete**

**5 videos**

**1 practice exercise**

**14 hours to complete**

## Sampling Methods

In this module, we discuss a class of algorithms that uses random sampling to provide approximate answers to conditional probability queries. Most commonly used among these is the class of Markov Chain Monte Carlo (MCMC) algorithms, which includes the simple Gibbs sampling algorithm, as well as a family of methods known as Metropolis-Hastings.

**14 hours to complete**

**5 videos**

**2 practice exercises**

**26 minutes to complete**

## Inference in Temporal Models

In this brief lesson, we discuss some of the complexities of applying some of the exact or approximate inference algorithms that we learned earlier in this course to dynamic Bayesian networks.

**26 minutes to complete**

**1 video**

**1 practice exercise**

### Reviews

#### 4.6

##### TOP REVIEWS FROM PROBABILISTIC GRAPHICAL MODELS 2: INFERENCE

Just like the first course of the specialization, this course is really good. It is well organized and taught in the best way which really helped me to implement similar ideas for my projects.

I have clearly learnt a lot during this course. Even though some things should be updated and maybe completed, I would definitely recommend it to anyone whose interest lies in PGMs.

Very good course. Subject is quiet complex: lack of concrete examples to make sure concepts well understood. Had to review each the Course twice to understand concepts well

Thanks a lot for professor D.K.'s great course for PGM inference part. Really a very good starting point for PGM model and preparation for learning part.

I learned pretty much from this course. It answered my quandaries from the representation course, and as well deepened my understanding of PGM.

I would have like to complete the honors assignments, unfortunately, I'm not fluent in Matlab. Otherwise, great course!

great course, though really advanced. would like a bit more examples especially regarding the coding. worth it overally

Very interesting course. However, even after completing it with honors, I feel like I don't understand a lot.

Great introduction.\n\nIt would be great to have more examples included in the lectures and slides.

Great course, except that the programming assignments are in Matlab rather than Python

Great introduction to inference. Requires some extra reading from the textbook.

Had a wonderful and enriching fun filled experience, Thank you Daphne Ma'am

### About Stanford University

## About the Probabilistic Graphical Models Specialization

## Frequently Asked Questions

When will I have access to the lectures and assignments?

Once you enroll for a Certificate, you’ll have access to all videos, quizzes, and programming assignments (if applicable). Peer review assignments can only be submitted and reviewed once your session has begun. If you choose to explore the course without purchasing, you may not be able to access certain assignments.

What will I get if I subscribe to this Specialization?

When you enroll in the course, you get access to all of the courses in the Specialization, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile. If you only want to read and view the course content, you can audit the course for free.

What is the refund policy?

Is financial aid available?

Learning Outcomes: By the end of this course, you will be able to take a given PGM and

Execute the basic steps of a variable elimination or message passing algorithm

Understand how properties of the graph structure influence the complexity of exact inference, and thereby estimate whether exact inference is likely to be feasible

Go through the basic steps of an MCMC algorithm, both Gibbs sampling and Metropolis Hastings

Understand how properties of the PGM influence the efficacy of sampling methods, and thereby estimate whether MCMC algorithms are likely to be effective

Design Metropolis Hastings proposal distributions that are more likely to give good results

Compute a MAP assignment by exact inference

Honors track learners will be able to implement message passing algorithms and MCMC algorithms, and apply them to a real world problem

More questions? Visit the Learner Help Center.