I don't understand this simple algorithm from Russel & Norvig for computing a distribution of X given certain observed values e:(adsbygoogle = window.adsbygoogle || []).push({});

I am having trouble understanding exactly what Enumerate-All does. Specifically I do not understand how P(y | parents(Y)) is computed. We don't know the values that the parents of Y take, do we?Code (Text):

function Enumeration-Ask(X, e, bn) returns a distribution over X

inputs: X, the query variable

e, observed values for variables E

bn, a Bayes net with variables {X} u E u Y /* Y = hidden variables */

Q(X) <- a distribution over X, initially empty

for each value xi of X do

extend e with value xi for X

Q(xi) <- Enumerate-All(Vars[bn], e)

return Normalize(Q(X))

function Enumerate-All(vars, e) returns a real number

if Empty?(vars) then return 1.0

Y <- First(vars)

if Y has value y in e

then return P(y | parents(Y)) * Enumerate-All(Rest(vars), e)

else return the sum over y of P(y | parents(Y)) * Enumerate-All(Rest(vars), ey)

where ey is e extended with Y = y

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Bayes net inference

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Bayes inference | Date |
---|---|

Linear Congruential Generators, Bays-Durham Shuffle | May 31, 2012 |

**Physics Forums - The Fusion of Science and Community**