Skip to Main Content
Bayesian Networks
book

Bayesian Networks

by Marco Scutari, Jean-Baptiste Denis
June 2014
Intermediate to advanced content levelIntermediate to advanced
241 pages
6h 20m
English
CRC Press
Content preview from Bayesian Networks
26 Bayesian Networks: With Examples in R
> querygrain(jedu, nodes = c("S", "T"), type = "marginal")
$S
S
M F
0.6126 0.3874
$T
T
car train other
0.5594 0.2835 0.1571
As we have seen above, another possible choice is "joint", for the joint dis-
tribution of the nodes. The last valid value is "conditional". In this case
querygrain returns the distribution of the first node in nodes conditional on
the other nodes in nodes (and, of course, on the evidence we specified with
setEvidence).
> querygrain(jedu, nodes = c("S", "T"), type = "conditional")
T
S car train other
M 0.6126 0.6126 0.6126
F 0.3874 0.3874 0.3874
Note how the probabilities in each column sum up to 1, as they are computed
conditional on the value T assumes in that particular column.
Furthermore, we can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Applications of Bayesian Reliability

Practical Applications of Bayesian Reliability

Yan Liu, Athula I. Abeyratne
Benefits of Bayesian Network Models

Benefits of Bayesian Network Models

Philippe Weber, Christophe Simon
Learning Bayesian Models with R

Learning Bayesian Models with R

Hari Manassery Koduvely

Publisher Resources

ISBN: 9781482225587