next up previous
Next: 4 Logistic Regression Up: 3 The Basics Previous: 3.2 Binomial Distribution


3.3 Multinomial Distribution

We can easily extend our distribution from binomial to multinomial in Tractable Markov logic. For example, we might want to model the outcome of a six-faced die over a number of throws. We could create a Die class with Throw objects as subparts and a Throw class with an attribute for which Face lands up:

class DieClass {
subparts Throw 10;
}

class Throw {
Face One 0.0, Two 0.0, Three 0.0, Four 0.0, Five 0.0, Six 0.0;
}

Attributes are mutually exclusive and exhaustive, so each object of type Face must have one value of Face be true and the rest false in a possible world. Since the subclass weights are all equal, if we run probabilistic inference on this TML KB:

> infer -i die.tml -r die.result -e die.db -q Face(Throw)

we find that each face relation for each throw has an equal probability. We can also query the probability for one particular value of face. Face(Die.Throw[1],One) gives the probability that the first throw is of the number 1; Face(Throw,One) lists the probability of each object of class Throw is of the number 1. To model a biased die which does not result in each face with equal probability, we can change the weights of the values of the attribute Face.

Currently, weight learning is not available in Alchemy Lite; it will be in future release.


next up previous
Next: 4 Logistic Regression Up: 3 The Basics Previous: 3.2 Binomial Distribution
Marc Sumner 2010-01-22