Two neighbouring pixels in a photo are usually the same colour, but neither one causes the other. How can a plain undirected link with agreement scores describe this, and how are the scores turned into probabilities?
Probabilistic models, Markov random fields
Level L1 Beginner. Length Short. Nature Th+Mat Both.
What's being asked
Whether you understand why some relationships are drawn as plain lines instead of arrows, and how scores are normalised into probabilities.
Key idea
When variables influence each other without a cause-and-effect direction, we draw a line with no arrow and attach a compatibility score to each combination of values. To get probabilities we divide each combined score by the total of all scores; that total is called the partition function.
Steps
- Each pixel is black (B) or white (W). Neighbouring pixels tend to match, but there is no "parent" pixel that creates the other, so an arrow would be misleading. A plain line says: these two influence each other.
- Give each combination a compatibility score, where higher means more plausible. Say same colour scores 3 and different colours score 1. These scores are not probabilities, and they do not add up to 1.
- List the four combinations: BB scores 3, WW scores 3, BW scores 1 and WB scores 1. The total is .
- Divide each score by the total to get probabilities: BB and WW get each, BW and WB get each. So the chance that the pixels agree is . The total, 8, is the partition function.
- Compare with a Bayesian network (see `bayesian-network-factorisation`): there, arrows come with probability tables that already add up to 1. Here we use scores and must normalise at the end.
Common mistakes
- Reading a line as a cause. It only says that the two variables are directly linked.
- Treating the scores as probabilities. They need dividing by the total first.
How long your answer should be
Under 2 minutes, 4–6 sentences.
Read this
Previous in Probabilistic models: In a topic model, why do we describe each document as a mixture of topics, and each topic as a list of favourite words, and what is a tiny example?
Next in Probabilistic models: How is naive Bayes drawn as a graphical model, and what is its independence assumption? A spam filter has . The word "offer" appears in 60% of spam and 10% of ham (non-spam) emails; the word "meeting" appears in 30% of spam and 50% of ham. Using only these two words, what is for an email that contains both?