# Swedsen-Wang algorithm

(30 minutes to learn)

## Summary

The Swedsen-Wang algorithm is an MCMC algorithm for sampling from Ising models. It is an auxiliary variable model, where we define a set of "bond" variables which determine which states are coupled, and we alternate between sampling the states and the bond variables. It mixes much faster than Gibbs sampling in models where the variables are tightly coupled.

## Context

This concept has the prerequisites:

- Markov random fields (Swedson-Wang is a method for sampling from MRFs.)
- Gibbs sampling (Swedson-Wang is a special case of Gibbs sampling.)

## Core resources (read/watch one of the following)

## -Paid-

→ Machine Learning: a Probabilistic Perspective

A very comprehensive graudate-level machine learning textbook.

Location:
Section 24.5.3, pages 866-868

## Supplemental resources (the following are optional, but you may find them useful)

## -Free-

→ Bayesian Reasoning and Machine Learning

A textbook for a graudate machine learning course.

→ Machine learning summer school: Markov chain Monte Carlo (2009)

## See also

-No Additional Notes-