Skip to content

Latest commit

 

History

History
59 lines (33 loc) · 2.86 KB

lecture-17.md

File metadata and controls

59 lines (33 loc) · 2.86 KB

How to sample a Graphical Model

The Product-Sum algorithm is an algorithm for computing for sampling a graphical model. It works well if the graph has a tree like structure, but in other situations it isn't. It is sometimes called a message passing algorithm.

  • Add in extra nodes into your graph called "factors" in the middle of each arrow. (The original nodes are called variables). Also you can drop the directness of the graph
  • This is now a bipartite graph (i.e. one which can be coloured with only 2 colours and all adjacent nodes have different colours. Associate numbers with all nodes
  • Alternate updating these numbers. The Factors get updated by products of terms and the Variables get updated by sums of terms.

In Practice We have made some observations (e.g. characters) and we want to figure out the marginal probabilities in the graphical model (e.g. the word someone was trying to type). Finding the full joint distribution is too hard of problem for graphical models

  • We associate a function f(xi, xj) with the factor between x_i and xj.
  • Hence we can say P(xi,...xn)= Πj f j(xa(j),xb(j)).
  • Update the factors with a message called v. v is a message from a variable xn to xm and it represents the conditional probability P(xm| all the children of n)

Problems

With a tree graph, the product-sum algorithm will converge. However with a chain of loop like structure old information will get amplified. If chains are long or there is some sort of attenuation this is not really important, but if the chains are short the probabilities you get will be wrong.

Problem Given the structure and lots of samples from Graphical models, can we figure out the relationships between them? This is a learning problem.

From Boltzmann Machine we will deal with binary variables. The graph is separated into 2 parts, the hidden variables and visible variables. The links in the graph encode a complicated probability distribution. The hidden part is supporting structure for the visible.

Let E=Σi<jsi sj wij.

Let α be some configuration of the system. P(α) is proportional to e-Eα/t

Pick si and consider it changing its state.

Calculate Esi=1 and Esi=0

The parameter T can be viewed as temperature

A High T gives:

A Low T gives

let α be a configuration of the visible states and β be a confuguration of hidden states

We want to calculate: