Understanding Bayes Net Inference Algorithm from Russel & Norvig

  • Thread starter Thread starter 0rthodontist
  • Start date Start date
  • Tags Tags
    Net
AI Thread Summary
The discussion centers on the confusion surrounding the Bayes Net Inference Algorithm, specifically the Enumerate-All function from Russel & Norvig's work. The user seeks clarity on how the probability P(y | parents(Y)) is calculated when the values of the parent variables are unknown. It is highlighted that the algorithm requires extending the evidence set with possible values for the variable Y, which allows for the computation of probabilities based on the known parent values. The normalization step at the end ensures that the distribution over X is valid. Understanding these steps is crucial for grasping how the algorithm computes the distribution of the query variable X given observed values.
0rthodontist
Science Advisor
Messages
1,229
Reaction score
0
I don't understand this simple algorithm from Russel & Norvig for computing a distribution of X given certain observed values e:

Code:
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

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?
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
I am trying to run an .ipynb file and have installed Miniconda as well as created an environment as such -conda create -n <env_name> python=3.7 ipykernel jupyter I am assuming this is successful as I can activate this environment via the anaconda prompt and following command -conda activate <env_name> Then I downloaded and installed VS code and I am trying to edit an .ipynb file. I want to select a kernel, via VS Code but when I press the button on the upper right corner I am greeted...

Similar threads

Replies
1
Views
2K
Replies
9
Views
2K
Replies
15
Views
2K
Replies
8
Views
2K
Replies
1
Views
2K
Replies
5
Views
2K
Back
Top