# What are the potential functions of the cliques in Markov random field?

I have been trying to understand the representation of the joint probability density of Markov random fields in the form of factors of the potential functions. I am finding it difficult to grasp the idea of potential functions and how we are supposed to choose a potential function. Any suggestions on how I should get started. I have gone through the wiki page and some other resources, but still I couldn't grasp the essence of it.

## 1 Answer

All potential functions can be written in a log-linear form as described in the Wikipedia article. This however may not be that useful, as it requires you to specify a weight for all possible configurations of your clique.

Your choice of potential function depends on the properties of the variables you are modelling. For example, if you are implementing a Kalman filter (which is an autoregressor for continuous variables assuming Gaussian noise), your potential functions are Gaussian. For binary variables ($$x_1$$, and $$x_2$$) that should approximate an XOR relationship you could specify the following potential function:

$$1/Z \cdot \exp(a + b \cdot x_1 + b \cdot x_2 + c \cdot x_1 \cdot x_2)$$

where a and b are positive and c is negative. For a very good introduction to probabilistic models I'd recommend Mike Jordan's technical report / book Graphical Models, Exponential Families and Variational Inference or consider taking a look at Chris Bishop's book.