class FlipSequence {
Side Heads 1.0, Tails;
}
Note that if no weight is given to an attribute, the default is a weight of 0.0. An equivalent update to the .tml file is:
class FlipSequence {
Side Heads 1.0, Tails 0.0;
}
we have a binomial distribution with
being the number of flips (in our case
10) and
, where
is the weight of the unit clause
(in our case 1). We can verify this by running probabilistic inference:
al -i binomial_coin.tml -o binomial_coin.result -e coin.db -q Side(Flip)
The marginal probabilities for values of Heads returned will be
.